Commit Graph

954 Commits

Author SHA1 Message Date
Kris Maglione
48e53b3df5 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la
2017-11-01 20:35:52 -07:00
JW Wang
963ded77a8 Bug 1417869. P2 - abort the load algorithm early if media not allowed to load. r=jya
MozReview-Commit-ID: DUxyo4ywCPW
2017-11-21 14:02:13 +08:00
Alastor Wu
7baabd66f1 Bug 1382574 - part3 : remove HTMLMediaElement::mHasUserInteraction. r=jwwang
We won't need to check the whether the media element is interacted with user for
autoplay anymore.

MozReview-Commit-ID: 2tll9LtGyVR
2017-11-22 00:33:23 +08:00
Alastor Wu
02838507d1 Bug 1382574 - part1 : create new class AutoplayPolicy to handle autoplay logic. r=jwwang
AutoplayPolicy is used to manage autoplay logic for all kinds of media,
including MediaElement, Web Audio and Web Speech.

MozReview-Commit-ID: R1TxMkarIw
2017-11-22 00:33:16 +08:00
Andreas Pehrson
f8e3023623 Bug 1208378 - Distinguish track sinks on whether their presence allows a source to stop. r=jib
There are currently two types of sinks for a MediaStreamTrackSource.
Actual MediaStreamTracks and HTMLMediaElement::StreamCaptureTrackSource.
A source needs actual tracks as sinks to not stop() the underlying source.

A StreamCaptureTrackSource, however, should not count toward keeping a source
alive (otherwise HTMLMediaElement.mozCaptureStream() would prevent track.stop()
from working on the track feeding the media element).

MozReview-Commit-ID: 9MBAyZFZUIQ
2017-11-10 15:08:02 +01:00
Andreas Pehrson
c56b8a5c93 Bug 1208378 - Implement MediaStreamTrack's muted state and events. r=jib,smaug
MozReview-Commit-ID: 1Sp9utMnWXI
2017-11-06 19:03:52 +01:00
Andreas Pehrson
7ed5ae20c6 Bug 1208378 - Make HTMLMediaElement register its Sink. r=jib
This is a drive-by fix in that it is not directly related to what the bug is
solving. However, making HTMLMediaElement register as a sink is important,
and pairing it with the WeakPtr<Sink> patch reduces risk greatly.

MozReview-Commit-ID: 7pMDw3MG0ZB
2017-11-06 18:08:26 +01:00
Timothy Guan-tin Chien
f0261c6ad0 Bug 1327097 - Part III, Trap mouse/touch/pointer events in audio/video element, r=smaug
This patch implements HTMLMediaElement::GetEventTargetParent and set
aVisitor.mCanHandle to false to mouse/touch/pointer events, when
the media control is present. This tells the event dispatcher that
these events are supposed to be handled exclusively by the
videocontrol binding within the media element, and should not
dispatch nor consumed by the content.

MozReview-Commit-ID: BXWZX9SYsuC
2017-11-17 11:07:12 +08:00
JW Wang
71930eaf78 Bug 1417869. P3 - pass descriptive messages to NetworkError(). r=jya
MozReview-Commit-ID: 6yaFJvXG3g8
2017-11-17 11:07:30 +08:00
JW Wang
de09352a4f Bug 1417869. P2 - pass descriptive messages to NotifyLoadError(). r=jya
MozReview-Commit-ID: JGPOsLvUJFX
2017-11-17 10:46:33 +08:00
JW Wang
8b85f534ec Bug 1417869. P1 - show more descriptive messages for MEDIA_ERR_SRC_NOT_SUPPORTED when SelectResource() fails. r=jya
MozReview-Commit-ID: CySbHaJCaC5
2017-11-17 10:32:41 +08:00
Gurzau Raul
3fea16876e Backed out 3 changesets (bug 1327097) for eslint failures toolkit/content/tests/widgets/test_videocontrols.html:228 r=backout on a CLOSED TREE
Backed out changeset 09c0a4c56c78 (bug 1327097)
Backed out changeset c0c5ee67b3ef (bug 1327097)
Backed out changeset 82a6e4dc5da7 (bug 1327097)
2017-11-16 14:23:20 +02:00
Timothy Guan-tin Chien
bdc4d0a876 Bug 1327097 - Part III, Trap mouse/touch/pointer events in audio/video element, r=smaug
This patch implements HTMLMediaElement::GetEventTargetParent and set
aVisitor.mCanHandle to false to mouse/touch/pointer events, when
the media control is present. This tells the event dispatcher that
these events are supposed to be handled exclusively by the
videocontrol binding within the media element, and should not
dispatch nor consumed by the content.

MozReview-Commit-ID: BXWZX9SYsuC
2017-11-16 17:06:36 +08:00
Kilik Kuo
cd46825275 Bug 1369548 - HTMLMediaElement::SetMediaKeys should continue working even the decoder is shutting down. r=cpearce
The MediaKeys status inside a HTMLME cannot be reflected correctly if the mSetCDMRequest is disconnected in HTMLME::ShutdownDecoder.
This may happen when a page calls load() or sets new src right after setting MediaKeys to null.

MozReview-Commit-ID: 3BZOmw7BNFO
2017-11-15 12:32:50 +08:00
Alastor Wu
54e0bff377 Bug 1336400 - part3 : move all autoplay checks to CanActivateAutoplay(). r=jwwang
1. move all checks to CanActivateAutoplay()
2. don't cache the pref's value in advance, it might cause wrong result
   if user changes pref after media was binded to tree.

MozReview-Commit-ID: 3BeOeaq9wGa
2017-11-13 18:43:55 +08:00
Alastor Wu
306a5abaab Bug 1336400 - part2 : remove MozAutoplayEnabled attribute from HTMLMediaElement. r=smaug
MozReview-Commit-ID: FK5F2zkXRjT
2017-11-13 18:42:47 +08:00
Chung-Sheng Fu
9511eedb9e Bug 1372073 - Spoof MediaStreamTrack. r=arthuredelstein,jib,smaug
MozReview-Commit-ID: 71UOGrJ9cgm
2017-10-13 11:57:25 +08:00
Chris Pearce
98bf109271 Bug 1416663 - Move Gecko/HTMLMediaElement specific stuff out of VideoFrameContainer. r=jwwang
MozReview-Commit-ID: 4giNMi8qsTZ
2017-11-13 16:09:23 +13:00
James Cheng
75643b86a6 Bug 1416141 - Remove Telemetry VIDEO_EME_PLAY_SUCCESS. r=kikuo
MozReview-Commit-ID: BtiD2tUmbE9
2017-11-10 14:49:37 +08:00
Mats Palmgren
917be0a687 Bug 1414666 part 2 - A few formatting improvements after mass conversion of PresContext()->PresShell() to PresShell(). r=emilio
MozReview-Commit-ID: FoEnINS0Jbk
2017-11-09 03:00:48 +01:00
Mats Palmgren
2544eb586c Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Kilik Kuo
853f877070 Bug 1395922 - [P3] Make HTMLMediaElement::SetMediaKeys asynchronously. r=cpearce
MozReview-Commit-ID: 5M8CTHMsmIh
2017-11-03 20:14:17 +08:00
Kilik Kuo
d6f2c41887 Bug 1395922 - [P1] Refactor code and move them into specific functions. r=cpearce
MozReview-Commit-ID: 9lwRH66Wllp
2017-11-03 14:35:32 +08:00
Kyle Machulis
7d80c15fab Bug 1412414 - Remove nsIDOMHTMLSourceElement; r=bz
MozReview-Commit-ID: 3ZK1GremntX
2017-10-27 15:00:42 -07:00
Csoregi Natalia
8293fe3698 Merge autoland to mozilla-central r=merge a=merge 2017-11-06 12:44:18 +02:00
Csoregi Natalia
492e79ef24 Backed out 6 changesets (bug 1395922) for failing Media tests test_eme_sample_groups_playback.html and test_eme_sample_groups_playback.html r=backout a=backout
Backed out changeset f856af63682e (bug 1395922)
Backed out changeset f59a7e727f39 (bug 1395922)
Backed out changeset 9cd31c6a8e2c (bug 1395922)
Backed out changeset d46f952f94f8 (bug 1395922)
Backed out changeset f786d928b1e0 (bug 1395922)
Backed out changeset bacda0f99f71 (bug 1395922)
2017-11-06 12:34:02 +02:00
Chris Pearce
f8a6ecb100 Bug 1414680 - Make MediaDecoderOwner::DispatchAsyncEvent() return void. r=jwwang
The return value is unchecked in MediaDecoder, and we only ever returned
NS_OK anyway. And we if the dispatch fails, we can't really do anything;
dispatching an "error" event probably won't work.

MozReview-Commit-ID: 67K6Mjft6tY
2017-11-05 09:12:44 +01:00
JW Wang
8f471871d2 Bug 1414121. P2 - let MediaDecoder::DumpDebugInfo() return a MozPromise. r=jya
MozReview-Commit-ID: Fau4ysdlwwa
2017-11-03 10:46:02 +08:00
JW Wang
19c2c2d20e Bug 1414121. P1 - let mozDumpDebugInfo() return a promise. r=bz
MozReview-Commit-ID: Klfr3AYdSCG
2017-11-03 10:33:27 +08:00
Kilik Kuo
a28a9f3650 Bug 1395922 - [P3] Make HTMLMediaElement::SetMediaKeys asynchronously. r=cpearce
MozReview-Commit-ID: 5M8CTHMsmIh
2017-11-03 20:14:17 +08:00
Kilik Kuo
56534df5ba Bug 1395922 - [P1] Refactor code and move them into specific functions. r=cpearce
MozReview-Commit-ID: 9lwRH66Wllp
2017-11-03 14:35:32 +08:00
Emilio Cobos Álvarez
cf5ec03009 Bug 1411612: Kill nsINode::eCONTENT. r=bz
MozReview-Commit-ID: ESlOqlwhcHI
2017-10-25 17:19:11 +02:00
Yoshi Huang
5664871e42 Bug 1407498 - Don't query loadingprincipal in common case. r=baku
We queried 'loadingprincipal' attribute on the common call path, however
this should be queried if it's loaded by System Principal.

Also rename loadingprincipal to triggeringprincipal
2017-10-24 10:13:31 +08:00
bechen@mozilla.com
9f3d6e0e99 Bug 1183495 - part2: Remove mozSrcObject in MediaElement. r=jwwang
MozReview-Commit-ID: 2bmYnu2RDdt
2017-10-20 11:23:07 +08:00
JW Wang
12fe53604a Bug 1410225 - return the pending seek promise for SeekToNextFrame() when a seek is already in action. r=gerald
MDSM doesn't reset the decoding pipeline of MFR when doing NextFrameSeek and
therefore fails the assertion by requesting video data while MFR is still seeking.

We put the fix in the media element because it doesn't make sense to do
NextFrameSeek while another seek is already in action.

MozReview-Commit-ID: D6FSiNWHrLU
2017-10-20 16:37:35 +08:00
JW Wang
f57e10f44a Bug 1409649 - shut down the decoder when MEDIA_ERR_ABORTED is received. r=gerald
http://searchfox.org/mozilla-central/rev/dca019c94bf3a840ed7ff50261483410cfece24f/dom/html/HTMLMediaElement.cpp#1395-1400

We need to shut down the decoder after setting network state to EMPTY.
Otherwise the decoder will keep loading and change ready state to HAVE_METADATA
or greater and then fail the assertion in AssertReadyStateIsNothing().

MozReview-Commit-ID: FpMDVAJHTS5
2017-10-18 16:08:33 +08:00
JW Wang
230433023d Bug 1409270. P4 - remove mWatchManager. r=gerald
MozReview-Commit-ID: G45ezz1o2x8
2017-10-17 15:10:23 +08:00
JW Wang
c8d8f0bf87 Bug 1409270. P3 - remove WatchTarget from the base class of HTMLMediaElement::StreamListener. r=gerald
MozReview-Commit-ID: B7fmYlJShEC
2017-10-17 15:06:58 +08:00
JW Wang
4932b65aa3 Bug 1409270. P2 - replace the use of mWatchManager.ManualNotify() with direct calls. r=gerald
MozReview-Commit-ID: I0t0Wp9lnAa
2017-10-17 14:52:38 +08:00
JW Wang
d7b511f6a7 Bug 1409270. P1 - remove Watchable<> from mDownloadSuspendedByCache. r=gerald
MozReview-Commit-ID: K0hhlOKN399
2017-10-17 14:46:15 +08:00
JW Wang
6f533b28de Bug 1409263. P2 - remove Watchable<> from HTMLMediaElement::mReadyState. r=gerald
MozReview-Commit-ID: EYXY7FDfYvd
2017-10-17 14:28:56 +08:00
JW Wang
ecaaad82d3 Bug 1409263. P1 - fix logs in ChangeReadyState(). r=gerald
The old code doesn't print readyState changes when networkState is EMPTY.

MozReview-Commit-ID: 8rWUbpsmNuu
2017-10-17 14:18:27 +08:00
Sebastian Hengst
08efa86e76 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Chris Pearce
9b2cde1bf4 Bug 1409178 - Move DecoderTraits::CreateDecoder() to ChannelMediaDecoder::Create(). r=jwwang
Now DecoderTraits doesn't need to depend on ChannelMediaDecoder.

MozReview-Commit-ID: D4AUiV2eGWy
2017-10-16 22:55:26 +02:00
JW Wang
4c995fe1fa Bug 1408482 - fix build error. r=gerald
MozReview-Commit-ID: HIq2zZROKRA
2017-10-17 10:55:11 +08:00
Kris Maglione
7cdbf75d48 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu
2017-10-15 23:15:40 -07:00
JW Wang
c09e83fac7 Bug 1407895 - ensure mDecoder->Suspend() is called on a newly created decoder if mPausedForInactiveDocumentOrChannel is true. r=gerald
See comment 3 for the root cause.

MozReview-Commit-ID: CX5npKv2eWG
2017-10-13 11:58:05 +08:00
JW Wang
9bf664fb28 Bug 1407148 - add logs for debugging crashes. r=gerald
MozReview-Commit-ID: FgDbl2tCbEE
2017-10-12 10:46:13 +08:00
JW Wang
4dc9de614f Bug 1397708 - remove HTMLMediaElement::mBegun. See comment 12 for the root cause. r=cpearce
When network state is changed to IDLE, mBegun is also set to false. [1]
And then when HTMLMediaElement::DownloadResumed(false) is called, network
state is not changed to LOADING for mBegun is false [2]. This prevents us
from firing 'progress' events for the network state is IDLE.

See comment 12 for more details.

[1] http://searchfox.org/mozilla-central/rev/b53e29293c9e9a2905f4849f4e3c415e2013f0cb/dom/html/HTMLMediaElement.cpp#6077
[2] http://searchfox.org/mozilla-central/rev/b53e29293c9e9a2905f4849f4e3c415e2013f0cb/dom/html/HTMLMediaElement.cpp#5673

MozReview-Commit-ID: DOfqKZXAqaz
2017-10-10 07:04:18 +08:00
Kris Maglione
a3d15ab9ad Bug 1406278: Part 5b - Use subject principal as triggering principal in <source> "src" attribute for <audio>/<video>. r=bz
MozReview-Commit-ID: zZCXpvs719
2017-10-05 15:28:22 -07:00