Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Allow retrieval, via HTMLMediaElement.srcObject, of media provider object (even if not assigned media provider object) #555

Closed
wolenetz opened this issue Aug 10, 2016 · 2 comments

Comments

@wolenetz
Copy link
Member

wolenetz commented Aug 10, 2016

Media Source Extensions (and MediaStreams, blob URLs, and File blob URLs) can attach to an HTMLMediaElement using an object URL assigned to the media element src attribute or one of its child element's src attribute. They may also attach to an HTMLMediaElement by simple setting of HTMLMediaElement.srcObject. The latter allows for later retrieval and inspection of the currently attached media provider object. The spec doesn't currently allow for the former (src attribute attachment) to reveal the underlying media provider object via srcObject. This issue tracks the request to add such support.

Note that this assumes #550 is fixed (consult also the monkey patch (w3c/media-source#143) that Media Source Extensions will likely use soon to indicate how src attribute attachment is done, which anticipates #550 is fixed to align with similar text in the WHATWG spec.)

See also discussion in w3c/media-source#143 (comment)

@foolip
Copy link
Member

foolip commented Aug 12, 2016

Let's discuss here, and if we can agree on something I can make the change in whatwg/html, maybe it can then be backported.

Where do you think it would make sense to put this? My best idea is at the top of the resource fetch algorithm, if invoked with a URL that has a media provider object, set "assigned media provider object" (which must be null) to that object.

But then assigned media provider object must also be cleared at some point later. It would also be possible to trigger the resource selection algorithm again and take the "If the media element has an assigned media provider object, then let mode be object" path instead of the previously taken attribute or children mode.

I think that maybe it's easier to work out the details of this in tandem with an implementation, to see if the idea really works. Would you be interested in experimenting with that @wolenetz?

FWIW, I think it'd be acceptable to just not solve this, since it would be a convenience and not something really new. Developers could use srcObject directly (with feature detection) to get the same benefits.

@siusin
Copy link
Contributor

siusin commented Jul 29, 2019

Thanks all.

We're closing this issue on the W3C HTML specification because the W3C and WHATWG are now working together on HTML, and all issues are being discussed on the WHATWG repository.

If you filed this issue and you still think it is relevant, please open a new issue on the WHATWG repository and reference this issue (if there is useful information here). Before you open a new issue, please check for existing issues on the WHATWG repository to avoid duplication.

If you have questions about this, please open an issue on the W3C HTML WG repository or send an email to [email protected].

@siusin siusin closed this as completed Jul 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants