Commit Graph

752 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
a4f6123bde Merge mozilla-central to autoland 2016-09-28 16:52:13 +02:00
James Andreou
1e947fec6c 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
42e8029df1 Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE
2016-09-08 18:06:20 +08:00
Carsten "Tomcat" Book
829190e2b0 Merge mozilla-central to mozilla-inbound 2016-09-22 11:56:22 +02:00
Chris Pearce
af78e9f93a Bug 1304604 - Use EventTarget to simplyfy HTMLMediaElement.onencrypted implementation. r=smaug
MozReview-Commit-ID: EUpZX4ODgNj
2016-09-22 16:25:38 +12:00
Chris Pearce
4f67ef3293 Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys. r=smaug
MozReview-Commit-ID: DhNV30BfksS
2016-09-21 14:10:26 +12:00
Chris Pearce
189d63eef1 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
2016-09-21 13:04:01 +12:00
Jean-Yves Avenard
1466fb42de Bug 1303970: P2. Fix "If the media data fetching process is aborted by the user steps". r=jwwang
MozReview-Commit-ID: 6n91VY00gAo
2016-09-20 19:52:06 +10:00
Jean-Yves Avenard
976b820536 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
2016-09-20 19:36:09 +10:00
JW Wang
19c0ee3464 Bug 1303347 - add assertions for debugging if Observe() could ever happen after Unsubscribe(). r=cpearce
MozReview-Commit-ID: 9XhGYI3fTqb
2016-09-20 11:27:46 +08:00
Jean-Yves Avenard
d227fd5005 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
2016-09-15 16:20:43 +10:00
Jean-Yves Avenard
1933de1197 Bug 1302632: P3. Provide failures details to error attribute. r=jwwang
MozReview-Commit-ID: 3eIXOF96UR4
2016-09-15 16:17:10 +10:00
Jean-Yves Avenard
51330b8560 Bug 1302632: P1. Set proper error code when readyState is HAVE_NOTHING. r=jwwang
MozReview-Commit-ID: CMQkW5pPDF2
2016-09-14 16:45:52 +10:00
Phil Ringnalda
f2abe31659 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
b4ab814b97 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
2016-09-15 16:20:43 +10:00
Jean-Yves Avenard
9bf064bc81 Bug 1302632: P3. Provide failures details to error attribute. r=jwwang
MozReview-Commit-ID: 3eIXOF96UR4
2016-09-15 16:17:10 +10:00
Jean-Yves Avenard
5faeec0612 Bug 1302632: P1. Set proper error code when readyState is HAVE_NOTHING. r=jwwang
MozReview-Commit-ID: CMQkW5pPDF2
2016-09-14 16:45:52 +10:00
Boris Zbarsky
ebe22a8365 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
8c3409a304 Merge mozilla-central to mozilla-inbound 2016-09-14 12:11:09 +02:00
Jean-Yves Avenard
a945c437e1 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S
2016-09-11 00:56:09 +10:00
kaku@mozilla.com
788fd469db 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
3e4dcf7643 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
90a343f11f 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
79a35e164a 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
d05d4c5116 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
425c839f4f 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
acd22e8efa Merge inbound to m-c a=merge 2016-09-07 17:54:24 -07:00
Andreas Pehrson
f20ab4d087 Bug 1300529 - Remove default arguments from HTMLMediaElement::CaptureStreamInternal. r=padenot
MozReview-Commit-ID: IL7odCBP74
2016-09-07 15:14:15 +02:00
Michael Layzell
f2f13378b5 Bug 1018486 - Part 1: Changes in dom/, r=baku
MozReview-Commit-ID: 4tCUM4KRe81
2016-09-07 10:50:35 -04:00
Jeremy Chen
c22b72adf2 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
2016-09-07 10:20:17 +08:00
Gerald Squelart
04eb9daee8 Bug 1300459 - Pass MediaInfo by const-ref to SetMediaInfo - r=jya
MozReview-Commit-ID: 5KvCBHmI1JC
2016-09-05 14:23:23 +10:00
Alastor Wu
6d093d007f Bug 1298777 - don't need to capture audio for media element without audio track. r=jwwang
MozReview-Commit-ID: DKRGiuTGjtg
2016-09-02 18:47:10 +08:00
Andreas Pehrson
4e763f0334 Bug 1299451 - Fix mozCaptureStream() happening after setting src but before having metadata. r=jesup
MozReview-Commit-ID: CKC3n3Nt5IE
2016-08-31 14:54:03 +02:00
Andreas Pehrson
45a6e05995 Bug 1299172 - HTMLMediaElement::StreamSizeListener spring cleaning. r=jesup
MozReview-Commit-ID: 25lt1j8t1Xh
2016-08-31 14:32:13 +02:00
Andreas Pehrson
db836401a1 Bug 1299172 - Fix media element StreamSizeListener calling DispatchToMainThreadAfterStreamStateUpdate off-MSG-thread. r=jesup
MozReview-Commit-ID: Cc2tJbEog20
2016-08-31 14:31:28 +02:00
Kaku Kuo
26c5d46d72 Bug 1299065 - invisible elements in the foreground should also be recorded; r=gerald
MozReview-Commit-ID: 56JBbJ743DM
2016-08-30 14:53:04 +08:00
Alastor Wu
2a26bc5f28 Bug 1262053 - part8 : remove function NotifyOwnerDocumentActivityChangedInternal. r=cpearce
MozReview-Commit-ID: DnWgQHGJLU5
2016-08-29 18:56:38 +08:00
Alastor Wu
0aa6d63f4f Bug 1262053 - part6 : don't need to capture media element without audio. r=baku,cpearce
MozReview-Commit-ID: GO6nXbzYwIy
2016-08-29 18:56:32 +08:00
Alastor Wu
a86a2617b9 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
2016-08-29 16:34:31 +08:00
Alastor Wu
80033f3fc5 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
2016-08-29 16:34:28 +08:00
Alastor Wu
8bbb47f0e2 Bug 1262053 - part3 : modify media element for blocking autoplay media. r=cpearce
MozReview-Commit-ID: 8e13lkYTN46
2016-08-29 16:34:26 +08:00
Chris Pearce
6abb31e01c Bug 1262053 - part2 : remove old media.block-play-until-visible behaviour. r=cpearce
MozReview-Commit-ID: GujLSVfu2rp
2016-08-29 10:42:10 +08:00
Jean-Yves Avenard
90c89d6302 Bug 1298594: P2. Fire waiting event when readyState move back to HAVE_CURRENT_DATA. r=jwwang
MozReview-Commit-ID: BpwYY6njXGC
2016-08-27 22:23:52 +10:00
Andreas Pehrson
71794987a5 Bug 1259788 - Ensure ready state is updated when first track added after NotifyTracksAvailable(). r=jesup
MozReview-Commit-ID: 1FwPfety82M
2016-08-19 13:41:48 +02:00
Andreas Pehrson
2d5667b427 Bug 1259788 - Add a new disabled mode for MSG tracks. r=jesup
MozReview-Commit-ID: 1dMTR4Wmcd8
2016-08-15 14:19:42 +02:00
Andreas Pehrson
0ea44a1cbd 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
2016-08-23 17:51:50 +02:00
Andreas Pehrson
f2994d694b 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
2016-08-12 13:50:41 +02:00
Andreas Pehrson
e335a8c2f6 Bug 1259788 - Rename CaptureStreamTrackSource to DecoderCaptureTrackSource. r=jesup
This prepares HTMLMediaElement for having a separate MediaStreamTrackSource for
MediaStreams, StreamCaptureTrackSource.

MozReview-Commit-ID: FVrYxFgvXgA
2016-07-06 12:15:27 +02:00
Andreas Pehrson
7851818950 Bug 1259788 - Multi-track support for MediaTrackList. r=jesup
MozReview-Commit-ID: 1av5uvyCMYv
2016-08-24 10:58:04 +02:00
Dan Glastonbury
eab84a26d9 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
2016-08-25 12:10:05 +10:00