Граф коммитов

333 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 81856604ef Bug 1454238: Remove nsINode::eMEDIA. r=bz
MozReview-Commit-ID: LPutL6PlrgG
2018-04-20 01:30:12 +02:00
Chris Pearce 5328fa5cb9 Bug 1453176 - Add telemetry to report fulfilment of HTMLMediaElement.play(). r=bryce
We'd like to know the proportion of HTMLMediaElement.play() calls that are
rejected due to autoplay being blocked. There are also other conditions that
cause us to reject the promise returned by HTMLMediaElement.play(), so add
telemetry to report all the identifyable conditions under which play()
succeeds or fails.

MozReview-Commit-ID: AZ67WWXaowN

--HG--
extra : rebase_source : 4a164cb0b4fb7fb6944cd371c6e90dde021a4dc0
2018-04-13 20:28:39 +12:00
Chris Pearce 04c2da8b9e Bug 1435134 - Don't play until we've reached metadata. r=bryce
We want to block playback of media which have an audio track, so if play()
is called before the load of the resource has loaded metadata, we need to
delay starting playback and resolving the play promise until we've figured
out whether the media has audio. So if play() is called before we've reached
readyState >= HAVE_METADATA, set a flag, and check that flag when we do
reach HAVE_METADATA and start the play and resolve the promise then.

MozReview-Commit-ID: 1K06NK2kfpw

--HG--
extra : rebase_source : 45636e77b44ed072e1bc3f1e9a9f73f206ee04de
2018-03-13 16:40:18 +13:00
Boris Zbarsky 14f26fccf6 Bug 1449631 part 8. Remove nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: 5wQ2LYrjUxf
2018-04-05 13:42:41 -04:00
Boris Zbarsky 258352c8a8 Bug 1447098 part 2. Rename the NS_IMPL_FROMCONTENT macros to NS_IMPL_FROMNODE. r=mystor 2018-03-21 17:39:04 -04:00
Chris Pearce 6747e4a735 Bug 1445104 - Remove HTMLMediaElement::{mStatsShowing,mMediaSecurityVerified} as they're unused. r=jya
MozReview-Commit-ID: LtKw4Hj3M0G

--HG--
extra : rebase_source : 1452b785ddc9fa6b689e8de15815f4b00ebed404
2018-03-13 13:33:42 +13:00
Chris Pearce d25ff179d0 Bug 1445104 - Initialize HTMLMediaElement fields in class declaration. r=jya
This makes the constructor simpler.

MozReview-Commit-ID: 30CO1iBj4rH

--HG--
extra : rebase_source : e78668547df1d07daa99f697bb56452253c419a6
2018-03-13 13:32:05 +13:00
Chris Pearce f589142a62 Bug 1434804 - Pause autoplayed media if they become audible. r=kamidphish
Our autoplay blocking is trivial to defeat; just mute or volume=0 a video,
play(), and then unmute, and then you're playing audibly.

So this patch makes us pause() media that become audible atfter playback
has started.

MozReview-Commit-ID: 2RAtbohMGJO

--HG--
extra : rebase_source : 021510102374185debc89610bc6027206a0af6fc
2018-03-12 13:05:04 +13:00
Dan Glastonbury 80cd024fd7 Bug 1440555 - P1: Allow setVisible to take effect before decoder creation. r=cpearce
MozReview-Commit-ID: GSNM6esm0fW

--HG--
extra : rebase_source : 89a9836a48a93f7dfc5ce78bc6fd8b2c11da9c0e
2018-02-27 14:33:41 +10:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Kyle Machulis 4040ae7b11 Bug 1407040 - Remove C++ usage of nsIDOMHTMLMediaElement; r=bz
MozReview-Commit-ID: 6MGS4UqKwrU

--HG--
extra : rebase_source : 19fe880afb9a7a0a7ff2405c8144cdb96b9fd5aa
2018-02-14 21:22:38 -08:00
Kyle Machulis b8e88868d6 Bug 1407040 - Change HTMLMediaElement QIs to FromContent calls; r=bz
MozReview-Commit-ID: JoHA0LbJnu9

--HG--
extra : rebase_source : c33c0d456ec5aeb7fec9867f5a55a401ec5ddf1e
2018-02-14 21:17:45 -08:00
Kyle Machulis 9e159ac69d Bug 1407040 - Change HTMLMediaElement XPCOM Enums to WebIDL Enums; r=bz
MozReview-Commit-ID: 55GnbaL2HKl

--HG--
extra : rebase_source : 5bb6c927443bf6adcfe594e69bd70c3b597b9ea4
2018-02-14 19:23:32 -08:00
Chris Pearce 595dccd4e7 Bug 1431674 - Backed out changeset 9d197f1860e6. r=backout
MozReview-Commit-ID: wP0aucXgzA

--HG--
extra : rebase_source : ad67234e7dff431c875bce5aac5b88e3c497dc78
2018-02-07 15:28:48 +13:00
Chris Pearce 6609188b9e 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

--HG--
extra : rebase_source : fa0bd85570746e60341e8e2d3f874f9bd30c0232
2018-02-07 15:28:07 +13:00
Emilio Cobos Álvarez c8eb630ebe 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 ffdf5d2cb5 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 c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Boris Zbarsky 04324f18ad Bug 1424474 part 3. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag
MozReview-Commit-ID: IjUEG5xwn5
2017-12-20 17:43:18 -05:00
Narcis Beleuzu edb8ba34eb Backed out 2 changesets (bug 1424474) for mochitest failures on test_bug494328.html r=backout on a CLOSED TREE
Backed out changeset 39d5991f02ba (bug 1424474)
Backed out changeset da3dec2fce06 (bug 1424474)
2017-12-21 02:55:27 +02:00
Boris Zbarsky a2696c3c8a Bug 1424474 part 2. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag 2017-12-20 17:43:18 -05:00
Gerald Squelart 16a9a0b9d7 Bug 1407810 - Implement HTMLMediaElement::Moz{Enable,Request}DebugLog - r=jwwang
MozReview-Commit-ID: 7Hhy6qBVjDk

--HG--
extra : rebase_source : 5eb33db2c13a4add3bef693af1e558b256732599
2017-10-16 16:18:58 +11:00
Boris Zbarsky 887ce3941a Bug 1419270 part 2. Use getter or setter specific NeedsSubjectPrincipal annotations more. r=qdot
MozReview-Commit-ID: KBwjFh3TMUg
2017-12-05 16:03:18 -05:00
Alastor Wu 258e1d56df 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

--HG--
extra : rebase_source : 2fdb3937156147755f8e387b1d84311ae1d37ce4
2017-11-29 18:59:56 +08:00
Sebastian Hengst c4e3d3a858 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 28c25979d7 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

--HG--
extra : rebase_source : 3fd7cb16da9e7f925ad7020fb74c48537e08a996
2017-11-29 18:05:56 +08:00
Alastor Wu 62e836ef58 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

--HG--
extra : rebase_source : c72212ebf29ea624128a8190dab67e1197f1f198
2017-11-27 10:55:02 +08:00
Kris Maglione 1c66345e09 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

--HG--
extra : rebase_source : 5dba46f61d70ec647cae16383b62961ac72d2f47
2017-11-01 20:35:52 -07:00
Alastor Wu fe30dc5702 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

--HG--
extra : rebase_source : 0047f482c2932e7063fc556ce8c306ff276efbfd
2017-11-22 00:33:23 +08:00
Alastor Wu 3a53368682 Bug 1382574 - part2 : remove HTMLMediaElement::GetHasUserInteraction(). r=bechen
MozReview-Commit-ID: 3MaumQvcR1q

--HG--
extra : rebase_source : d3dedf365b002680531ffd5e99fc0c0f66547e0f
2017-11-22 00:33:20 +08:00
Timothy Guan-tin Chien 93fb9c8b32 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

--HG--
extra : rebase_source : 5d6633a2e1a456d2d619b6f68498065d94c68c40
2017-11-17 11:07:12 +08:00
JW Wang 1f62c1d92b Bug 1417869. P3 - pass descriptive messages to NetworkError(). r=jya
MozReview-Commit-ID: 6yaFJvXG3g8

--HG--
extra : rebase_source : 2d1c851098be7eb880a01432c504c6db96d86756
extra : source : a30f9699f49687b23d4ccf955d7a0af8ce0c7653
2017-11-17 11:07:30 +08:00
JW Wang 232dbce4f6 Bug 1417869. P1 - show more descriptive messages for MEDIA_ERR_SRC_NOT_SUPPORTED when SelectResource() fails. r=jya
MozReview-Commit-ID: CySbHaJCaC5

--HG--
extra : rebase_source : fa907c6347b7c65e0b3196bbd370e7154307e645
extra : source : a393280da765a4602aa1486db8f891cf0fe188ee
2017-11-17 10:32:41 +08:00
Gurzau Raul d274011903 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 59cbfa1e3d 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

--HG--
extra : rebase_source : e9922ac6064c953ee233d6829e84bc7828518b43
2017-11-16 17:06:36 +08:00
Alastor Wu 147fdb715c 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

--HG--
extra : rebase_source : 74085dce2852d0a608f6455bd0b9337b8223fa20
2017-11-13 18:43:55 +08:00
Alastor Wu 3afdf8f65d Bug 1336400 - part2 : remove MozAutoplayEnabled attribute from HTMLMediaElement. r=smaug
MozReview-Commit-ID: FK5F2zkXRjT

--HG--
extra : rebase_source : 73620e7323e938e47e69b996e2c8aa2fc1e549f7
2017-11-13 18:42:47 +08:00
Chris Pearce 8bddf869cf Bug 1416663 - Move Gecko/HTMLMediaElement specific stuff out of VideoFrameContainer. r=jwwang
MozReview-Commit-ID: 4giNMi8qsTZ

--HG--
extra : rebase_source : 0f9e33c3704aa3925635d2290a5e18f9eebd2b74
2017-11-13 16:09:23 +13:00
James Cheng 91159e3d56 Bug 1416141 - Remove Telemetry VIDEO_EME_PLAY_SUCCESS. r=kikuo
MozReview-Commit-ID: BtiD2tUmbE9

--HG--
extra : rebase_source : 56b23930ea492c67f8c5fbc2a56d77dc7b4cf4af
2017-11-10 14:49:37 +08:00
Kilik Kuo 3f546c6285 Bug 1395922 - [P3] Make HTMLMediaElement::SetMediaKeys asynchronously. r=cpearce
MozReview-Commit-ID: 5M8CTHMsmIh

--HG--
extra : rebase_source : daec666760097b73a7dfad2960881173127eb69e
2017-11-03 20:14:17 +08:00
Kilik Kuo 87d6236019 Bug 1395922 - [P1] Refactor code and move them into specific functions. r=cpearce
MozReview-Commit-ID: 9lwRH66Wllp

--HG--
extra : rebase_source : 8202008d996adb19547a46f051427053c1d48193
2017-11-03 14:35:32 +08:00
Csoregi Natalia 978711ce7c Merge autoland to mozilla-central r=merge a=merge 2017-11-06 12:44:18 +02:00
Csoregi Natalia 6bf19d4921 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 ed7f41cdf7 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

--HG--
extra : rebase_source : ad644e8b97fc11488983bc05e18c9941b3c5b062
2017-11-05 09:12:44 +01:00
Chris Pearce d716365ee0 Bug 1414680 - Remove IsActive() and IsHidden() from MediaDecoderOwner as they're unused by MediaDecoder. r=jwwang
MozReview-Commit-ID: 7NaPBmQJVQC

--HG--
extra : rebase_source : 0cfe05a1aefb23a4070b2855569110e7a4ab6b2c
2017-11-05 09:11:09 +01:00
JW Wang 7fd4aabd85 Bug 1414121. P1 - let mozDumpDebugInfo() return a promise. r=bz
MozReview-Commit-ID: Klfr3AYdSCG

--HG--
extra : rebase_source : 9f2c89306a274b1d563f53413df668d9b11c7b90
extra : source : 93969bf54c26fd097807f1280db5b6deb20c01db
2017-11-03 10:33:27 +08:00
Kilik Kuo 55be93073e Bug 1395922 - [P3] Make HTMLMediaElement::SetMediaKeys asynchronously. r=cpearce
MozReview-Commit-ID: 5M8CTHMsmIh

--HG--
extra : rebase_source : c1b186f6da354b79036dea7175960e1e33a2eaae
2017-11-03 20:14:17 +08:00
Kilik Kuo 83013776bf Bug 1395922 - [P1] Refactor code and move them into specific functions. r=cpearce
MozReview-Commit-ID: 9lwRH66Wllp

--HG--
extra : rebase_source : 8126fe384c7a6f1c07bdb438507823527f14a4bf
2017-11-03 14:35:32 +08:00
bechen@mozilla.com 35226e578f Bug 1183495 - part2: Remove mozSrcObject in MediaElement. r=jwwang
MozReview-Commit-ID: 2bmYnu2RDdt

--HG--
extra : rebase_source : e6abd85f933463d2dfe73528c63be8736d2a1577
2017-10-20 11:23:07 +08:00