Commit Graph

502 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
762cd18602 Merge mozilla-central to autoland 2016-09-28 16:52:13 +02:00
James Andreou
a47ce92ac2 Bug 1282124 - Remove nsILoadInfo.usePrivateBrowsing and the SEC_FORCE_PRIVATE_BROWSING flag; r=smaug,jryans 2016-09-27 16:56:44 -04:00
James Cheng
48efb9caad Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE

--HG--
extra : rebase_source : abfe53f30081f74fc39c900cab48d08c7574bfec
2016-09-08 18:06:20 +08:00
Carsten "Tomcat" Book
ce8c91d458 Merge mozilla-central to mozilla-inbound 2016-09-22 11:56:22 +02:00
Chris Pearce
7a191ffc4f Bug 1304604 - Use EventTarget to simplyfy HTMLMediaElement.onencrypted implementation. r=smaug
MozReview-Commit-ID: EUpZX4ODgNj

--HG--
extra : rebase_source : dae4ac3da64b61bf282455f2b6e054e13e4cadc1
2016-09-22 16:25:38 +12:00
Chris Pearce
d42821ee80 Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys. r=smaug
MozReview-Commit-ID: DhNV30BfksS

--HG--
extra : rebase_source : 5fab8f1b3333ff8607c0325907fbe7214234c001
2016-09-21 14:10:26 +12:00
Chris Pearce
7e7b3c9f0f Bug 1280829 - Only block non-MSE content which is encrypted once it reaches load metadata. r=jya
Previously, we'd block loading of non-MSE content when there was a MediaKeys
attached, that is, we'd assume that all content was EME content if a MediaKeys
was attached. But some sites attach a MediaKeys and then load non-MSE non-EME
content, and that (despite being a bit silly) shouldn't fail.


MozReview-Commit-ID: 9LupWaehXim

--HG--
extra : rebase_source : 6db281feb27a61b49dc565d4d4562a3d2366fc89
2016-09-21 13:04:01 +12:00
Jean-Yves Avenard
e555d04fbf Bug 1303970: P2. Fix "If the media data fetching process is aborted by the user steps". r=jwwang
MozReview-Commit-ID: 6n91VY00gAo

--HG--
extra : rebase_source : 61aab7eecb527c55199a597db7b08681206c3f2f
2016-09-20 19:52:06 +10:00
Jean-Yves Avenard
3eae3b5916 Bug 1303970: P1. MEDIA_ERR_ABORTED can be returned even if readyState is HAVE_NOTHING. r=jwwang
So change assertion accordingly.

MozReview-Commit-ID: AuaDlyF0MAL

--HG--
extra : rebase_source : 60f1b34c8320d8ad47845bfd9d8f23e27d3a8620
2016-09-20 19:36:09 +10:00
JW Wang
5e9751305f Bug 1303347 - add assertions for debugging if Observe() could ever happen after Unsubscribe(). r=cpearce
MozReview-Commit-ID: 9XhGYI3fTqb

--HG--
extra : rebase_source : b42dce2b15cb044871e355090dade17abf651ee9
2016-09-20 11:27:46 +08:00
Jean-Yves Avenard
26629fd77e Bug 1302632: P4. Do not change network state to NETWORK_EMPTY. r=jwwang
There's no such step defined in the spec. Despite, this code can no longer be called when readyState is HAVE_NOTHING

MozReview-Commit-ID: 2fDoNHt1COp

--HG--
extra : rebase_source : d8b79acee85b00331f55153626038e26cd4a72c7
2016-09-15 16:20:43 +10:00
Jean-Yves Avenard
895efe36db Bug 1302632: P3. Provide failures details to error attribute. r=jwwang
MozReview-Commit-ID: 3eIXOF96UR4

--HG--
extra : rebase_source : eeeb298d46bd8c6957560e475b7b1c4728a392dc
2016-09-15 16:17:10 +10:00
Jean-Yves Avenard
8a54c1a711 Bug 1302632: P1. Set proper error code when readyState is HAVE_NOTHING. r=jwwang
MozReview-Commit-ID: CMQkW5pPDF2

--HG--
extra : rebase_source : f0286af0b2daa2f91bbea66ab7bcf6de1a6d2207
2016-09-14 16:45:52 +10:00
Phil Ringnalda
cd6041148f Backed out 5 changesets (bug 1302632) for forthcoming failures
Backed out changeset f2ced742d6aa (bug 1302632)
Backed out changeset 55e7962d4fc0 (bug 1302632)
Backed out changeset b20f7c887e6c (bug 1302632)
Backed out changeset 22772e4a9c72 (bug 1302632)
Backed out changeset 7d7558864a66 (bug 1302632)
2016-09-15 21:39:00 -07:00
Jean-Yves Avenard
4faaba2ab5 Bug 1302632: P4. Do not change network state to NETWORK_EMPTY. r=jwwang
There's no such step defined in the spec. Despite, this code can no longer be called when readyState is HAVE_NOTHING

MozReview-Commit-ID: 2fDoNHt1COp

--HG--
extra : rebase_source : baa542cdf3144db8b941c20f22548c67bfc06346
2016-09-15 16:20:43 +10:00
Jean-Yves Avenard
64dda2968c Bug 1302632: P3. Provide failures details to error attribute. r=jwwang
MozReview-Commit-ID: 3eIXOF96UR4

--HG--
extra : rebase_source : 7f5b03e3a6f5dbb40b16b1460132993b60d071e6
2016-09-15 16:17:10 +10:00
Jean-Yves Avenard
f359140d9d Bug 1302632: P1. Set proper error code when readyState is HAVE_NOTHING. r=jwwang
MozReview-Commit-ID: CMQkW5pPDF2

--HG--
extra : rebase_source : 2bd7828104b8f3ac5bb1d8bdc3f84b652300cabe
2016-09-14 16:45:52 +10:00
Boris Zbarsky
0fd831e559 Bug 1302304. Remove IDL bits that reference nsIDOMMediaError; it's not needed anymore. r=bkelly 2016-09-15 11:41:35 -04:00
Carsten "Tomcat" Book
9a2448ee1c Merge mozilla-central to mozilla-inbound 2016-09-14 12:11:09 +02:00
Jean-Yves Avenard
6a25692b20 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S

--HG--
extra : rebase_source : 469e6ed4e222fb6d6ac34843c3c3346a044c6023
2016-09-11 00:56:09 +10:00
kaku@mozilla.com
9a1c3746b2 Bug 1299718 part 3 - call MarkAsContentSource() at where using video element as a source; r=gerald,kamidphish,mtseng
MozReview-Commit-ID: Kg6UpcsCi0P
2016-09-14 15:50:29 +10:00
kaku@mozilla.com
09ae2d424f Bug 1299718 part 2 - implement the MarkAsContentSource() API; r=gerald,kamidphish
MozReview-Commit-ID: 1eAdcMAmXSB
2016-09-14 15:50:29 +10:00
Kaku Kuo
5286ffa8da Bug 1284350. Reland on top of backouts "Bug 1299065 - invisible elements in the foreground should also be recorded; r=gerald" r=kaku
Instead of "not visible", "approximately visible", and "visible" (in display port) we now have "approximately not visible", and "approximately visible" which includes "visible".
2016-08-30 14:53:04 +08:00
Kaku Kuo
cca4120327 Bug 1284350. Reland on top of backouts "Bug 1282710 - Part 1 - implement the suspend and resume logics in HTMLMediaElement.cpp according to visibility events; r=cpearce r=kamidphish" r=kaku
Instead of "not visible", "approximately visible", and "visible" (in display port) we now have "approximately not visible", and "approximately visible" which includes "visible".
2016-07-04 13:26:40 +08:00
Timothy Nikkel
4a590050bf Bug 1284350. Backed out changeset 1bbb1ab928c7 (Bug 1282710 - Part 1 - implement the suspend and resume logics in HTMLMediaElement.cpp according to visibility events; r=cpearce r=kamidphish) 2016-09-12 00:19:06 -05:00
Timothy Nikkel
e7b23cbf0f Bug 1284350. Backed out changeset 06bf533a2bdd (Bug 1299065 - invisible elements in the foreground should also be recorded; r=gerald) 2016-09-08 18:07:36 -05:00
Wes Kocher
5cbc382303 Merge inbound to m-c a=merge 2016-09-07 17:54:24 -07:00
Andreas Pehrson
c166a2bf07 Bug 1300529 - Remove default arguments from HTMLMediaElement::CaptureStreamInternal. r=padenot
MozReview-Commit-ID: IL7odCBP74

--HG--
extra : rebase_source : 3202348010f7c22a218fd37ad745ae7332fb007c
2016-09-07 15:14:15 +02:00
Michael Layzell
c47fca1cd7 Bug 1018486 - Part 1: Changes in dom/, r=baku
MozReview-Commit-ID: 4tCUM4KRe81
2016-09-07 10:50:35 -04:00
Jeremy Chen
e42a48e81d Bug 1297306 - part5:create enum constructors for EnumTable. r=baku
Enable nsAttrValue::EnumTable to be initialized with enum. So, we could get rid
of the castings in EnumTable. Fix EnumTable initialization comment.

For those untyped enumerations, declare them with uint8_t, as to other typed
enumerations with type size larger than int16_t, force casting to int16_t.

Use {nullptr,0} instead of {0} to represent the last entry.

MozReview-Commit-ID: 7Dma3Apkmxj

--HG--
extra : rebase_source : b2289866c4c33d80c8e170727bf109d018d92f67
2016-09-07 10:20:17 +08:00
Gerald Squelart
693932c5aa Bug 1300459 - Pass MediaInfo by const-ref to SetMediaInfo - r=jya
MozReview-Commit-ID: 5KvCBHmI1JC

--HG--
extra : rebase_source : aece207d36682e1a6cc4125ef660e2eb8f41d92c
2016-09-05 14:23:23 +10:00
Alastor Wu
384eb5f086 Bug 1298777 - don't need to capture audio for media element without audio track. r=jwwang
MozReview-Commit-ID: DKRGiuTGjtg

--HG--
extra : rebase_source : b5c2705b623d6479cb729f2a51aef637e59b1e39
2016-09-02 18:47:10 +08:00
Andreas Pehrson
3e21f8275b Bug 1299451 - Fix mozCaptureStream() happening after setting src but before having metadata. r=jesup
MozReview-Commit-ID: CKC3n3Nt5IE

--HG--
extra : rebase_source : 9c8348403cedb2ac7f68bce9fc5f36cfe2e08357
2016-08-31 14:54:03 +02:00
Andreas Pehrson
a91bec92ad Bug 1299172 - HTMLMediaElement::StreamSizeListener spring cleaning. r=jesup
MozReview-Commit-ID: 25lt1j8t1Xh

--HG--
extra : rebase_source : e972d008c5e80059dd10031df38cf400cc6c9650
2016-08-31 14:32:13 +02:00
Andreas Pehrson
864bcdc3c4 Bug 1299172 - Fix media element StreamSizeListener calling DispatchToMainThreadAfterStreamStateUpdate off-MSG-thread. r=jesup
MozReview-Commit-ID: Cc2tJbEog20

--HG--
extra : rebase_source : 83731e3fe29a7813a51f70eff8a0f43a21f92e1d
2016-08-31 14:31:28 +02:00
Kaku Kuo
60576ca55c Bug 1299065 - invisible elements in the foreground should also be recorded; r=gerald
MozReview-Commit-ID: 56JBbJ743DM

--HG--
extra : rebase_source : 2ff2066735bb89db066540716436ec5b33bfb449
2016-08-30 14:53:04 +08:00
Alastor Wu
56e48dbbf5 Bug 1262053 - part8 : remove function NotifyOwnerDocumentActivityChangedInternal. r=cpearce
MozReview-Commit-ID: DnWgQHGJLU5

--HG--
extra : rebase_source : a6c4ab94fad22b2bef1bdde07bc17246943128f7
2016-08-29 18:56:38 +08:00
Alastor Wu
97b81589f8 Bug 1262053 - part6 : don't need to capture media element without audio. r=baku,cpearce
MozReview-Commit-ID: GO6nXbzYwIy

--HG--
extra : rebase_source : 03aba373fde9133bf373292b2cdded5f04f22781
2016-08-29 18:56:32 +08:00
Alastor Wu
47079de3ad Bug 1262053 - part5 : register audio agent immediately when media element starts playing. r=baku
In ancient degisn, we would only register audio channel after the media element has audio track and enoguh data to playback,
that is because the "audio-playback" event would be dispatched with the registration, and then shows the tab audio indicator.

However, now the event dispatching doesn't follow with the registration, it would be triggered when the media element has
really audible data which would be notified from media decoder.

Therefore, the media element without audio track or without enough data can also register audio channel agent, it won't affect
the display of tab audio indicator. The reason we need to do that is for blocking autoplay media in the non-visited tab.

The autoplay can be adding "autoplay" keyword or playing by the script, and we don't want to dispatch dom event for blocked
media. Therefore, we should register audio channel agent to know whether it needs to be blocked immediately even the media
element doesn't have any enough data which can let us to distinguish it have any audio track or not (this information can
be known from metadata).

First, we must check whether the media is blocked which is notified by audio channel agent, and then we can decide whether
need to dispatch the event. If we don't register audio channel agent, that we can't get blocking information.

MozReview-Commit-ID: HLLkOuecql1

--HG--
extra : rebase_source : 99c34f0185276ecd5b70ae09959b47c584d1564e
2016-08-29 16:34:31 +08:00
Alastor Wu
9021286e9a Bug 1262053 - part4 : don't dispatch dom event for blocked media. r=cpearce
If the media was blocked, we would postpone the dom event and dispatch them after media is resumed.

MozReview-Commit-ID: LcdJtH16qQn

--HG--
extra : rebase_source : 209d18925a88a9e0dac82f2c0695ec1b60f54f63
2016-08-29 16:34:28 +08:00
Alastor Wu
c060486878 Bug 1262053 - part3 : modify media element for blocking autoplay media. r=cpearce
MozReview-Commit-ID: 8e13lkYTN46

--HG--
extra : rebase_source : 134d698c6136b8dcf0ef67c6b40df787c42cb886
2016-08-29 16:34:26 +08:00
Chris Pearce
1231058432 Bug 1262053 - part2 : remove old media.block-play-until-visible behaviour. r=cpearce
MozReview-Commit-ID: GujLSVfu2rp

--HG--
extra : rebase_source : 6d229b3817736039e46713c9e029dec8fd8d5913
2016-08-29 10:42:10 +08:00
Jean-Yves Avenard
816b36a832 Bug 1298594: P2. Fire waiting event when readyState move back to HAVE_CURRENT_DATA. r=jwwang
MozReview-Commit-ID: BpwYY6njXGC

--HG--
extra : rebase_source : 6dfe1998341ccf9fea69d8974f08aaa54385628d
2016-08-27 22:23:52 +10:00
Andreas Pehrson
d7f4cea968 Bug 1259788 - Ensure ready state is updated when first track added after NotifyTracksAvailable(). r=jesup
MozReview-Commit-ID: 1FwPfety82M

--HG--
extra : rebase_source : a241d20acddff8bac40ba9c1bc1c8318ead25fae
2016-08-19 13:41:48 +02:00
Andreas Pehrson
9a907cfbfc Bug 1259788 - Add a new disabled mode for MSG tracks. r=jesup
MozReview-Commit-ID: 1dMTR4Wmcd8

--HG--
extra : rebase_source : 8c2ea262d53901a11ec5c0e5067f328461dee8f2
2016-08-15 14:19:42 +02:00
Andreas Pehrson
091e8c0b00 Bug 1259788 - Support MediaStream sources for HTMLMediaElement.mozCaptureStream(). r=jesup
This adds support for HTMLMediaElement.mozCaptureStream() and
mozCaptureStreamUntilEnded() for a HTMLMediaElement playing a MediaStream.

This is up to spec, while capturing a HTMLMediaElement playing a file is not.
This incompatibility means we cannot mix sources for the returned MediaStream.

As such, a MediaStream returned while the HTMLMediaElement was playing a file
will only have content while the element is playing files. If the src changes
to a MediaStream, the stream will be empty.

It works the same way if a MediaStream was captured while the HTMLMediaElement
was playing another MediaStream.

This is due to TrackID management - MediaDecoder doesn't care, and creates new
tracks when you seek, so users are unable to keep track, while for MediaStream
we control everything from main thread and keep track of the TrackIDs used
previously.

This also adds a separate path from MediaElementAudioSourceNode so that we don't
forward video tracks when the returned MediaStream is only used internally for
WebAudio. We should in that case not require a DOMMediaStream but just forwarding
tracks to a TrackUnionStream should be enough, and will save us some cpu cycles.
This is however fine for now as it's simpler.

MozReview-Commit-ID: Bg8hESDISDU

--HG--
extra : rebase_source : 83885a73ec8cfc5fbe3c30a9330a52cd6b6dff12
extra : source : f1aec79078869c0a6435a1c06957c649d7a40dd9
2016-08-23 17:51:50 +02:00
Andreas Pehrson
83dcc7266e Bug 1259788 - Break out AddTrackInternal() from DOMMediaStream::CreateDOMTrack. r=jesup
Sometimes a track is added to a stream synchronously (before the stream is
exposed to script), and sometimes asynchronously (see the mediacapture-main spec
on the "addtrack" event).

In the latter case we might still need to create the MediaStreamTrack object
synchronously for tracking purposes. CaptureStream of Media element playing a
MediaStream wants this.

MozReview-Commit-ID: 7me8xzN7rwj

--HG--
extra : rebase_source : 4f129b127b855e47aad2ae9ab3981ffde057412d
2016-08-12 13:50:41 +02:00
Andreas Pehrson
e9d5ff0db1 Bug 1259788 - Rename CaptureStreamTrackSource to DecoderCaptureTrackSource. r=jesup
This prepares HTMLMediaElement for having a separate MediaStreamTrackSource for
MediaStreams, StreamCaptureTrackSource.

MozReview-Commit-ID: FVrYxFgvXgA

--HG--
extra : rebase_source : 5c162a0e861fa693fea0ba6b94b8e45446c0c13c
extra : source : a9151ac77a81573b8dbd9fee9c8aa09ba8dc7812
2016-07-06 12:15:27 +02:00
Andreas Pehrson
702bbad147 Bug 1259788 - Multi-track support for MediaTrackList. r=jesup
MozReview-Commit-ID: 1av5uvyCMYv

--HG--
extra : rebase_source : d60ecefbe55bf3d77521aaf3aced427e0012411a
extra : source : e108109d193b5f18e358fcb226d7700c5103d9cc
2016-08-24 10:58:04 +02:00
Dan Glastonbury
0e76b94eb8 Bug 1297429 - Fix video suspend intermittent failures. r=jwwang
On Linux x64 PGO try, HTMLMediaElement was reliably invoking
decoder->NotifyOwnerActivityChanged() after SetVisible(false) was
called. This caused the pending suspend to be cancelled and the test
waits for an event that never arrives.

Fixed by adding 'forced hidden' to MediaDecoder that overrides the
element visibility that comes from HTMLMediaElement.

MozReview-Commit-ID: 5aRhxxZ5cZd

--HG--
extra : rebase_source : 5a4e1c44ddd2265eab545f8fe19c4ae47cebf7bf
2016-08-25 12:10:05 +10:00