Commit Graph

1084 Commits

Author SHA1 Message Date
Adrian Wielgosik
14167d9013 Bug 1438956 - Remove nsIDOMTimeRanges. r=bz
MozReview-Commit-ID: DAgQ0OkSxkq
2018-02-16 19:34:28 +01:00
Kyle Machulis
9ce6990bc9 Bug 1407040 - Remove C++ usage of nsIDOMHTMLMediaElement; r=bz
MozReview-Commit-ID: 6MGS4UqKwrU
2018-02-14 21:22:38 -08:00
Kyle Machulis
b3a2a50103 Bug 1407040 - Change HTMLMediaElement QIs to FromContent calls; r=bz
MozReview-Commit-ID: JoHA0LbJnu9
2018-02-14 21:17:45 -08:00
Kyle Machulis
6404db48ec Bug 1407040 - Change HTMLMediaElement XPCOM Enums to WebIDL Enums; r=bz
MozReview-Commit-ID: 55GnbaL2HKl
2018-02-14 19:23:32 -08:00
Chris Pearce
e22e59f94c Bug 1431674 - Backed out changeset 9d197f1860e6. r=backout
MozReview-Commit-ID: wP0aucXgzA
2018-02-07 15:28:48 +13:00
Chris Pearce
20ed465a7f Bug 1431674 - Backed out changeset 3e22200b7e83. r=backout
The changes in bug 1324883 regressed YouTube, so back them out.

The changes in bug 1324883 were trying to cause the media cache to be cleared
on tab close and on CTRL+F5 reload (i.e. a bypass cache-reload) but they are
causing problems on YouTube,  which doesn't use the media cache and instead
uses MSE.

MozReview-Commit-ID: Hx2cehZ2wm1
2018-02-07 15:28:07 +13:00
Andreas Pehrson
c38486c12d Bug 1299515 - Plumb MediaStreamTrack enabled state to sources. r=jib
MozReview-Commit-ID: Eg1g9JtLmOz
2017-11-10 15:55:42 +01:00
Andrea Marchesini
3faaf5a84b Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Brindusan Cristian
1153f2c09e Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini
b434804b93 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Chris Peterson
677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
Honza Bambas
0691670da7 Bug 1391277 - Investigative logging in CSP: log when 'upgrade-insecure-requests' CSP is added to the CSP context, r=bz 2018-01-11 10:57:00 +02:00
Kilik Kuo
ba14257c35 Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info. r=jwwang
MozReview-Commit-ID: GYtHxdsGSk1
2018-01-10 12:07:47 +08:00
Emilio Cobos Álvarez
8a71d3197b Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez
ecd202d763 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez
b3956b6171 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-07 19:13:50 +01:00
Gerald Squelart
39c2b02fa1 Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0
2017-10-10 17:55:27 +11:00
Gerald Squelart
b25c781d32 Bug 1407810 - Implement HTMLMediaElement::Moz{Enable,Request}DebugLog - r=jwwang
MozReview-Commit-ID: 7Hhy6qBVjDk
2017-10-16 16:18:58 +11:00
JW Wang
f96c236ca3 Bug 1422677. P2 - remove the side effect of MediaDecoder::CanPlayThrough(). r=bechen,gerald
We calculate 'canplaythrough' in ChannelMediaDecoder::DownloadProgressed() and
send updates to MDSM.

MozReview-Commit-ID: KAeDciPAUKs
2017-12-01 14:34:58 +08:00
Andreas Pehrson
cd521a3dbc Bug 1419363 - Switch to WeakPtr. r=jib 2017-12-01 10:52:18 -05:00
Alastor Wu
ddc69c4c1a Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH
2017-11-30 10:50:21 +08:00
Alastor Wu
f1a57c71e0 Bug 1420488 - part1 : bless media if media has started playing before. r=jwwang
If the media has started playing before, bless it and it would always be allowed
to autoplay.

MozReview-Commit-ID: 4GqMARLXULU
2017-11-29 18:59:56 +08:00
Sebastian Hengst
5c93ed8143 Backed out 2 changesets (bug 1420488) for eslint failures in toolkit/content/tests/browser/browser_autoplay_policy_play_twice.js. r=backout
Backed out changeset 92bd0fcb67d5 (bug 1420488)
Backed out changeset 0f211029517c (bug 1420488)
2017-11-29 17:31:28 +02:00
Alastor Wu
92ac80ff76 Bug 1420488 - part1 : bless media if media has started playing before. r=jwwang
If the media has started playing before, bless it and it would always be allowed
to autoplay.

MozReview-Commit-ID: 28X4TmG25aJ
2017-11-29 18:05:56 +08:00
Kilik Kuo
9af080a497 Bug 1419897 - Crash in mozilla::dom::HTMLMediaElement::RemoveMediaKeys. r=jwwang
The process of |TryRemoveMediaKeysAssociation()| is a 2-step async procedue in mainthread.
mMediaKeys might be set to null inside |NotifyOwnerDocumentActivityChanged()| in between
|TryRemoveMediaKeysAssociation| and |RemoveMediaKeys|.

MozReview-Commit-ID: HtiADt3UTvp
2017-11-28 23:06:34 +08:00
Sebastian Hengst
a3d3aaf9d3 Backed out 3 changesets (bug 1415478) for frequently asserting in own test test_autoplay_policy.html at MediaDecoderStateMachine.cpp:989. r=backout
Backed out changeset 6ba103fe1caf (bug 1415478)
Backed out changeset df6721a3584f (bug 1415478)
Backed out changeset 8a802839959b (bug 1415478)
2017-11-27 19:57:34 +02:00
Alastor Wu
79671d4fb8 Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH
2017-11-27 19:20:15 +08:00
Alastor Wu
de0fd34b42 Bug 1420192 - when disable autoplay, allow script calls play() once user triggered load() or seek(). r=jwwang
This patch is mainly reverting the changing of bug1382574 part3, but not all the same.

Since youtube would call load() when user clicks to play, and then call play()
later. For the old pref (checking user-input-play), we should still allow the
following play() even it's not triggered via user input. It's also same for
seeking, Youtube would call play() after seeking completed.

In this patch, we would allow the script-calling once play() if user has called load()
or seek() before that.

MozReview-Commit-ID: 1UcxRCVfhnR
2017-11-27 10:55:02 +08:00
dluca
ee725b2035 Backed out 3 changesets (bug 1415478) for frequently asserting at dom/media/MediaDecoderStateMachine.cpp:1009 on a CLOSED TREE
Backed out changeset 447d895b350d (bug 1415478)
Backed out changeset d855c032c823 (bug 1415478)
Backed out changeset 6739012c4bdf (bug 1415478)
2017-11-24 18:50:53 +02:00
Alastor Wu
eb061944a9 Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH
2017-11-24 11:14:26 +08:00
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