Closed Bug 1269249 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: Audio/Video: Playback, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jya, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

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+
https://hg.mozilla.org/mozilla-central/rev/d177920befc0
https://hg.mozilla.org/mozilla-central/rev/57f7b48e73fa
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Depends on: 1298606
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: