Closed
Bug 1391666
Opened 7 years ago
Closed 7 years ago
[EME] media elements with autoplay attribute set will never start with EME
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla57
People
(Reporter: jya, Assigned: jya)
References
(Blocks 1 open bug, )
Details
Attachments
(4 files)
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
lizzard
:
approval-mozilla-beta+
lizzard
:
approval-mozilla-esr52-
|
Details |
59 bytes,
text/x-review-board-request
|
cpearce
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
cpearce
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
Bug 1389844 didn't fully fixed the issue.
The issue appears to be related to the dispatch of the waitingforkey event.
We enter the case:
http://searchfox.org/mozilla-central/rev/e8c36327cd8c9432c69e5e1383156a74330f11f2/dom/html/HTMLMediaElement.cpp#5857
mWaitingForKey is WAITING_FOR_KEY_DISPATCHED.
mWaitingForKey appears to not be reset, even after we've got the key until play() is called.
mWaitingForKey isn't reset.
Assignee | ||
Comment 1•7 years ago
|
||
Something is a miss there:
http://searchfox.org/mozilla-central/rev/e8c36327cd8c9432c69e5e1383156a74330f11f2/dom/html/HTMLMediaElement.cpp#5857
mWaitingForKey will only ever go back to NOT_WAITING_FOR_KEY there:
http://searchfox.org/mozilla-central/rev/e8c36327cd8c9432c69e5e1383156a74330f11f2/dom/html/HTMLMediaElement.cpp#5921
But this only occurs of mPaused is false.
mPaused will only go to true later in http://searchfox.org/mozilla-central/rev/e8c36327cd8c9432c69e5e1383156a74330f11f2/dom/html/HTMLMediaElement.cpp#5927
By this time readyState is HAVE_FUTURE_DATA.
We will never enter again the condition:
if (oldState < nsIDOMHTMLMediaElement::HAVE_FUTURE_DATA &&
mReadyState >= nsIDOMHTMLMediaElement::HAVE_FUTURE_DATA) {
And so mWaitingForKey is stuck on WAITING_FOR_KEY_DISPATCHED
Assignee | ||
Comment 2•7 years ago
|
||
The core issue actually here is:
http://searchfox.org/mozilla-central/rev/e8c36327cd8c9432c69e5e1383156a74330f11f2/dom/html/HTMLMediaElement.cpp#5921
if (!mPaused) {
mWaitingForKey = NOT_WAITING_FOR_KEY;
NotifyAboutPlaying();
}
mWaitingForKey will only be reset following a change of readyState, if the element isn't paused.
But this isn't the case here, playback never started, mPaused is always true
Assignee | ||
Updated•7 years ago
|
Summary: [MSE] Shaka Player autoplay no longer works on ifinitytv.it and mediasetpremium.it streaming services in Firefox 55 (Part2) → [EME] media elements with autoplay attribute set will never start with EME
Assignee | ||
Comment 3•7 years ago
|
||
[why tracking] This will cause a regression with any sites using EME and expecting to automatically start.
status-firefox55:
--- → affected
status-firefox56:
--- → affected
status-firefox-esr52:
--- → affected
tracking-firefox56:
--- → ?
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8899092 [details]
Bug 1391666 - P1. Mochitest to verify correct behavior.
https://reviewboard.mozilla.org/r/170418/#review175596
Attachment #8899092 -
Flags: review?(gsquelart) → review+
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8899095 [details]
Bug 1391666 - P4. Remove unecessary code.
https://reviewboard.mozilla.org/r/170424/#review175598
Attachment #8899095 -
Flags: review?(gsquelart) → review+
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8899093 [details]
Bug 1391666 - P2. Reset mWaitingForKey when we have data and autoplay attribute is set
https://reviewboard.mozilla.org/r/170420/#review175600
It looks like I am addressing the same issue in Bug 1390443. P3.
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8899093 [details]
Bug 1391666 - P2. Reset mWaitingForKey when we have data and autoplay attribute is set
https://reviewboard.mozilla.org/r/170420/#review175646
Attachment #8899093 -
Flags: review?(cpearce) → review+
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8899094 [details]
Bug 1391666 - P3. Change to HAVE_ENOUGH_DATA when possible.
https://reviewboard.mozilla.org/r/170422/#review175648
Attachment #8899094 -
Flags: review?(cpearce) → review+
Comment 13•7 years ago
|
||
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2031042cb44d
P1. Mochitest to verify correct behavior. r=gerald
https://hg.mozilla.org/integration/autoland/rev/4c7241cf8a4f
P2. Reset mWaitingForKey when we have data and autoplay attribute is set r=cpearce
https://hg.mozilla.org/integration/autoland/rev/109370151602
P3. Change to HAVE_ENOUGH_DATA when possible. r=cpearce
https://hg.mozilla.org/integration/autoland/rev/fc9fa66d198c
P4. Remove unecessary code. r=gerald
Comment 14•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2031042cb44d
https://hg.mozilla.org/mozilla-central/rev/4c7241cf8a4f
https://hg.mozilla.org/mozilla-central/rev/109370151602
https://hg.mozilla.org/mozilla-central/rev/fc9fa66d198c
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 15•7 years ago
|
||
Want to request uplift? Does this need manual testing/verification?
Flags: needinfo?(jyavenard)
Assignee | ||
Comment 16•7 years ago
|
||
I've already indirectly asked for uplift in bug 1389844. No need for manual testing. I've written mochi test for it, and the original person who reported the bug confirmed that the issue was fixed.
Do I need to separately ask for uplift here too?
Flags: needinfo?(jyavenard)
Comment 17•7 years ago
|
||
Yes please, it is too easy for the sheriffs (or relman) to miss that kind of indirect request.
Updated•7 years ago
|
Flags: needinfo?(jyavenard)
Assignee | ||
Comment 18•7 years ago
|
||
Comment on attachment 8899092 [details]
Bug 1391666 - P1. Mochitest to verify correct behavior.
Comment on attachment 8897938 [details]
Bug 1389844 - P1. Add mochitest.
Approval Request Comment
[Feature/Bug causing the regression]: bug 1382303
[User impact if declined]: Playback of some video sites will never start.
[Is this code covered by automated tests?]: Yes, mochitest were written to verify coverage
[Has the fix been verified in Nightly?]: Yes, original reporter communicated to me that the issue was fixed
[Needs manual test from QE? If yes, steps to reproduce]: no, as there's mochitests in place
[List of other uplifts needed for the feature/fix]: all patches of bug 1391666
[Is the change risky?]: no
[Why is the change risky/not risky?]: We relax the behaviour for some streams whose content doesn't start exactly at 0 (which is unfortunately rather common). In the worse case we more losely say we are ready to play something when we may not, but this condition isn't fatal and will always recover.
[String changes made/needed]: none
[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
User impact if declined: see above
Fix Landed on Version: 57
Risk to taking this patch (and alternatives if risky): There are alternatives to make on the JS video player, but people are unlikely to do those.
String or UUID changes made by this patch: none
For a full fix of the problem reported, bug 1389844 is required.
Flags: needinfo?(jyavenard)
Attachment #8899092 -
Flags: approval-mozilla-esr52?
Attachment #8899092 -
Flags: approval-mozilla-beta?
Comment 19•7 years ago
|
||
Comment on attachment 8899092 [details]
Bug 1391666 - P1. Mochitest to verify correct behavior.
Let's try these patches on beta 6. Missed the build for today's beta though.
It seems a bit risky for ESR and doesn't fit the criteria for mid-ESR uplift.
Attachment #8899092 -
Flags: approval-mozilla-esr52?
Attachment #8899092 -
Flags: approval-mozilla-esr52-
Attachment #8899092 -
Flags: approval-mozilla-beta?
Attachment #8899092 -
Flags: approval-mozilla-beta+
Comment 20•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/4e6b8a64e613
https://hg.mozilla.org/releases/mozilla-beta/rev/53d7d0601775
https://hg.mozilla.org/releases/mozilla-beta/rev/065ea81827ae
https://hg.mozilla.org/releases/mozilla-beta/rev/21bc77a750df
Flags: in-testsuite+
Updated•7 years ago
|
Comment 21•7 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #18)
> [Is this code covered by automated tests?]: Yes, mochitest were written to
> verify coverage
> [Has the fix been verified in Nightly?]: Yes, original reporter communicated
> to me that the issue was fixed
> [Needs manual test from QE? If yes, steps to reproduce]: no, as there's
> mochitests in place
Setting qe-verify- based on jya's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•