Closed Bug 1549642 Opened 6 years ago Closed 6 years ago

[webvtt] Enable wpt "testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration.html""

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This test failed because we exclude cues with negative duration in [1]. If we would like to enable this test, we have to add this kinds of cue to otherCue and then treat it as missing cue in TimeMarchesOn in order to dispatch enter and exit for it.

However, if we do so, it would result in large amount of unnesscesary enter and exit being dispatched, because everytime the cue's start time is larger than lastTime, it would be added in missing cue because its endtime is always smaller than currentTime.

So here we should not follow what spec said perfectly, because it would cause the unnecessary overhead.

[1] https://searchfox.org/mozilla-central/rev/e7d9a8749303b39dadcc0e18ea0d60a570a68145/dom/media/TextTrack.cpp#323-326

Assignee: nobody → alwu

According to the spec [1], the cue's end time might be negative and be smaller than its start time.

In this case, when we reach the cue's start start on the media time line, we should treat it as a missing cue (which won't be actually displayed, but will receive events) when we run the TimeMarchesOn.

Therefore, we have to add this kinds of cue into otherCue and let TimeMarchesOn handle it properly, to dispatch enter and exit event for it.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-cue-end-time

Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/175f567cd163 handle cue with negative duration. r=jya
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: