Closed Bug 1531863 Opened 5 years ago Closed 5 years ago

Implement the `show-poster-flag` for HTMLMediaElement

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug, )

Details

Attachments

(5 files)

https://html.spec.whatwg.org/multipage/media.html#show-poster-flag

There are some places in the spec which mention we should run timeMarchesOn algorithm if the show-poster-flag is true, but we didn't implement this flag for HTMLMediaElement.

To create a function wrapper which would automatically check whether track list exists, in order to reduce unnecessary checking.

In order to make the implementation more fitting with the spec, move the implementation of pending-text-track-change-notification-flag fomr text track list to media element.

In addition, it also help us not to expose the internal flag show-poster (which will be implemented in patch3) of media element when doing the related algorithm.

According to the spec [1], implement the show-poster-flag which is used to decide whether we need to run TimeMarchesOn algorithm under certain situations.

[1] https://html.spec.whatwg.org/multipage/media.html#show-poster-flag

Priority: P3 → P2
Blocks: 1509446
Attachment #9047894 - Attachment description: Bug 1531863 - part2 : handle text track changed in MediaElement. → Bug 1531863 - part2 : handle text track mode changed in MediaElement.
No longer blocks: 1509446

Add missing augment and enable the wpt.

Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c9628b2b89b2
part1 : implement 'GetMediaElement()' function wrapper. r=jya
https://hg.mozilla.org/integration/autoland/rev/21bafd01b438
part2 : handle text track mode changed in MediaElement. r=jya
https://hg.mozilla.org/integration/autoland/rev/5be609c16665
part3 : implement the 'show-poster-flag' for HTMLMediaElement. r=jya
https://hg.mozilla.org/integration/autoland/rev/e2e2b325344f
part4 : enable wpt 'track-change-event.html'. r=jya

According to the spec [1] step3, the 'change' event won't be dispatched immediately, so we should run the following check until we get the 'change' event.

[1] https://html.spec.whatwg.org/multipage/media.html#pending-text-track-change-notification-flag

Flags: needinfo?(alwu)
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b9bb0da7cd6
part1 : implement 'GetMediaElement()' function wrapper. r=jya
https://hg.mozilla.org/integration/autoland/rev/6dbda553b478
part2 : handle text track mode changed in MediaElement. r=jya
https://hg.mozilla.org/integration/autoland/rev/442e99192e46
part3 : implement the 'show-poster-flag' for HTMLMediaElement. r=jya
https://hg.mozilla.org/integration/autoland/rev/859e7f4b9cb1
part4 : enable wpt 'track-change-event.html'. r=jya
https://hg.mozilla.org/integration/autoland/rev/7ae9bc24596f
part5 : modify test 'test_videocontrols_vtt.html'. r=jaws
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/15784 for changes under testing/web-platform/tests
Upstream PR was closed without merging
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: