Closed
Bug 1362165
Opened 8 years ago
Closed 8 years ago
[MSE] readyState may be HAVE_NOTHING after init segment appended
Categories
(Core :: Audio/Video: Playback, enhancement, P1)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
(Blocks 2 open bugs)
Details
Attachments
(12 files)
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
jwwang
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
jwwang
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
jwwang
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mozbugz
:
review+
|
Details |
When appending an init segment, we may fire "updateend" though readyState is still HAVE_NOTHING
Per spec, readyState must be moved to HAVE_METADATA:
https://w3c.github.io/media-source/#sourcebuffer-init-segment-received
step 6:
"6. If the HTMLMediaElement.readyState attribute is HAVE_NOTHING, then run the following steps:
"
And only after returning from the "init segment received" algorithm should updateend event be fired.
This is the cause of some mochitest intermittent failure (such as test_TruncatedDuration.html) and likely why we have some reports about streams not starting.
The reason for this is that many live streams start by seeking to a particular position right after appending some data.
However, if readyState is HAVE_NOTHING, then the seek process is to be aborted:
https://dev.w3.org/html5/spec-preview/media-elements.html#dom-media-seek
"If the media element's readyState is HAVE_NOTHING, abort these steps."
Assignee | ||
Comment 1•8 years ago
|
||
Bug 879717 added a change that force the readyState to HAVE_METADATA if nothing has been painted yet.
This is against the MSE spec that only defines the state based on the buffered range, regardless of what got painted.
Blocks: 879717
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 14•8 years ago
|
||
mozreview-review |
Comment on attachment 8871942 [details]
Bug 1362165: P1. Fix potential race accessing members.
https://reviewboard.mozilla.org/r/143454/#review147292
Attachment #8871942 -
Flags: review?(gsquelart) → review+
Comment 15•8 years ago
|
||
mozreview-review |
Comment on attachment 8871943 [details]
Bug 1362165: P2. Don't expect that all data has been processed after metadata.
https://reviewboard.mozilla.org/r/143456/#review147294
Attachment #8871943 -
Flags: review?(gsquelart) → review+
Comment 16•8 years ago
|
||
mozreview-review |
Comment on attachment 8871944 [details]
Bug 1362165: P3. Remove unecessary code.
https://reviewboard.mozilla.org/r/143458/#review147296
Attachment #8871944 -
Flags: review?(gsquelart) → review+
Comment 17•8 years ago
|
||
mozreview-review |
Comment on attachment 8871945 [details]
Bug 1362165: P4. Don't assume the duration found when reading metadata will be the final one.
https://reviewboard.mozilla.org/r/143460/#review147298
Attachment #8871945 -
Flags: review?(gsquelart) → review+
Comment 18•8 years ago
|
||
mozreview-review |
Comment on attachment 8871946 [details]
Bug 1362165: P5. Don't assume that when stalling all data has been loaded.
https://reviewboard.mozilla.org/r/143462/#review147300
Attachment #8871946 -
Flags: review?(gsquelart) → review+
Comment 19•8 years ago
|
||
mozreview-review |
Comment on attachment 8871947 [details]
Bug 1362165: P6. Only use sourcebuffer again once previous operation completed.
https://reviewboard.mozilla.org/r/143464/#review147302
Attachment #8871947 -
Flags: review?(gsquelart) → review+
Comment 20•8 years ago
|
||
mozreview-review |
Comment on attachment 8871953 [details]
Bug 1362165: P12. Updated wpt expectation.
https://reviewboard.mozilla.org/r/143476/#review147304
Attachment #8871953 -
Flags: review?(gsquelart) → review+
Comment 21•8 years ago
|
||
mozreview-review |
Comment on attachment 8871948 [details]
Bug 1362165: P7. Only complete appendBuffer once readyState has changed.
https://reviewboard.mozilla.org/r/143466/#review147372
::: dom/media/mediasource/SourceBuffer.h:169
(Diff revision 1)
> uint32_t aLength,
> ErrorResult& aRv);
>
> void AppendDataCompletedWithSuccess(const SourceBufferTask::AppendBufferResult& aResult);
> void AppendDataErrored(const MediaResult& aError);
> + void ResumeAppendDataCompleted();
This function is used nowhere in this commit.
Attachment #8871948 -
Flags: review?(jwwang) → review+
Comment 22•8 years ago
|
||
mozreview-review |
Comment on attachment 8871949 [details]
Bug 1362165: P8. Fix mochitests.
https://reviewboard.mozilla.org/r/143468/#review147374
::: dom/media/mediasource/test/test_DurationChange.html:22
(Diff revision 1)
> var sb = ms.addSourceBuffer("video/webm");
>
> fetchWithXHR("seek.webm", function (arrayBuffer) {
> sb.appendBuffer(new Uint8Array(arrayBuffer, 0, 318));
> - once(v, "loadedmetadata")
> + var promises = [];
> + promises.push(once(sb, "updateend"));
Per spec, we expect 'updateend' to come after 'loadedmetadata', right?
Attachment #8871949 -
Flags: review?(jwwang) → review+
Comment 23•8 years ago
|
||
mozreview-review |
Comment on attachment 8871950 [details]
Bug 1362165: P9. Update mochitests.
https://reviewboard.mozilla.org/r/143470/#review147376
Attachment #8871950 -
Flags: review?(jwwang) → review+
Assignee | ||
Comment 24•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8871949 [details]
Bug 1362165: P8. Fix mochitests.
https://reviewboard.mozilla.org/r/143468/#review147374
> Per spec, we expect 'updateend' to come after 'loadedmetadata', right?
yes...
however the order set in promises do no matter.
but I'll change the order to make it clearer
Assignee | ||
Updated•8 years ago
|
Attachment #8871951 -
Flags: review?(james) → review?(jwwang)
Attachment #8871952 -
Flags: review?(james) → review?(jwwang)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8871951 -
Flags: review?(james) → review?(jwwang)
Attachment #8871952 -
Flags: review?(james) → review?(jwwang)
Comment 37•8 years ago
|
||
mozreview-review |
Comment on attachment 8871951 [details]
Bug 1362165: Add web platform test.
https://reviewboard.mozilla.org/r/143472/#review147748
Attachment #8871951 -
Flags: review+
Comment 38•8 years ago
|
||
mozreview-review |
Comment on attachment 8871952 [details]
Bug 1362165: Correct test.
https://reviewboard.mozilla.org/r/143474/#review147750
r+ with nit:
::: commit-message-51d93:6
(Diff revision 2)
> +Bug 1362165: Correct test. r?jgraham
> +
> +the durationchange event will be queued during the initialization segment received algorithm.
> +Only once the init segment has been fully processed will update/updateend be queued.
> +
> +As such, the updateend event must be fired before being able to call appendBuffer once again.
Remove 2nd space in "to call".
Attachment #8871952 -
Flags: review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 42•8 years ago
|
||
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20e01cb7989d
P1. Fix potential race accessing members. r=gerald
https://hg.mozilla.org/integration/autoland/rev/c89c6c8630f1
P2. Don't expect that all data has been processed after metadata. r=gerald
https://hg.mozilla.org/integration/autoland/rev/bc1e56d5cb9b
P3. Remove unecessary code. r=gerald
https://hg.mozilla.org/integration/autoland/rev/5334cc6d0ea9
P4. Don't assume the duration found when reading metadata will be the final one. r=gerald
https://hg.mozilla.org/integration/autoland/rev/bb63055aef6c
P5. Don't assume that when stalling all data has been loaded. r=gerald
https://hg.mozilla.org/integration/autoland/rev/55f7558b7c52
P6. Only use sourcebuffer again once previous operation completed. r=gerald
https://hg.mozilla.org/integration/autoland/rev/846a4761d0cd
P7. Only complete appendBuffer once readyState has changed. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/be4b872ba909
P8. Fix mochitests. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/2ba56b296e40
P9. Update mochitests. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/3329385fcf2d
Add web platform test. r=gerald
https://hg.mozilla.org/integration/autoland/rev/138425350cc6
Correct test. r=gerald
https://hg.mozilla.org/integration/autoland/rev/1e51fbdefff8
P12. Updated wpt expectation. r=gerald
Comment 43•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/20e01cb7989d
https://hg.mozilla.org/mozilla-central/rev/c89c6c8630f1
https://hg.mozilla.org/mozilla-central/rev/bc1e56d5cb9b
https://hg.mozilla.org/mozilla-central/rev/5334cc6d0ea9
https://hg.mozilla.org/mozilla-central/rev/bb63055aef6c
https://hg.mozilla.org/mozilla-central/rev/55f7558b7c52
https://hg.mozilla.org/mozilla-central/rev/846a4761d0cd
https://hg.mozilla.org/mozilla-central/rev/be4b872ba909
https://hg.mozilla.org/mozilla-central/rev/2ba56b296e40
https://hg.mozilla.org/mozilla-central/rev/3329385fcf2d
https://hg.mozilla.org/mozilla-central/rev/138425350cc6
https://hg.mozilla.org/mozilla-central/rev/1e51fbdefff8
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•