playing event not always fired if resume from stall is close to the end.

RESOLVED FIXED in Firefox 49

Status

()

P1
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jya, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
mozilla49
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Seen in the new mochitest added in bug 1269178.

The mochitest dom/media/mediasource/test/test_FrameSelection_mp4.html loads some data and wait for the waiting event to be fired (as the video is missing data).

It then adds 3 video frames to the source buffer and wait for the "ended" event to be fired.

So we go from "waiting" to "ended", the "playing" event is never upon resuming from waiting mode.

By spec:
"Playback is ready to start after having been paused or delayed due to lack of media data. "

"readyState is newly equal to or greater than HAVE_FUTURE_DATA and paused is false, or paused is newly false and readyState is equal to or greater than HAVE_FUTURE_DATA. "

The problem here is that we change readyState to HAVE_FUTURE_DATA only if we have more then 250ms of data ahead of current time.

But here, being so close to the end of the video, there's only ~0.10s worth of data ahead.

We should clamp the interval to the element's duration so that "playing" is properly fired
Comment on attachment 8747587 [details]
MozReview Request: Bug 1269249: [MSE] P1. Clamp range to media source duration when media source is ended. r?jwwang

https://reviewboard.mozilla.org/r/49957/#review46877
Attachment #8747587 - Flags: review?(jwwang) → review+
Comment on attachment 8747588 [details]
MozReview Request: Bug 1269249: [MSE] P2. Add mochitest verifying behavior. r?jwwang

https://reviewboard.mozilla.org/r/49959/#review46879
Attachment #8747588 - Flags: review?(jwwang) → review+

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d177920befc0
https://hg.mozilla.org/mozilla-central/rev/57f7b48e73fa
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox49: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
(Reporter)

Updated

3 years ago
Depends on: 1298606
You need to log in before you can comment on or make changes to this bug.