Skip to content

Media: fix media resource concept for video #32623

@gterzian

Description

@gterzian

Spec: https://html.spec.whatwg.org/multipage/#media-resource

The videoTracks attribute of a media element must, per the spec:

return a live AudioTrackList object representing the audio tracks available in the media element's media resource.

and the media resource concept tells us that:

the video data of the media resource is only that of the currently selected track.

Our current implementation, below, returns a VideoTrackList for all tracks, not just the selected one.

fn VideoTracks(&self) -> DomRoot<VideoTrackList> {

This makes this test assertion fail: https://searchfox.org/mozilla-central/rev/2f48061aef8c8976b73749ee845e7b85751f5f2f/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html#26

I think VideoTrackList needs to modulate it's behavior when it is associated with a media_element.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions