This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html Multipage: http://www.whatwg.org/C#sourcing-out-of-band-text-tracks Complete: http://www.whatwg.org/c#sourcing-out-of-band-text-tracks Comment: <track> Move crossorigin="" to <track> Posted from: 2001:4c28:a030:30:10c4:66a0:3c62:e586 by simonp@opera.com User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64
[[ If URL is not the empty string, perform a potentially CORS-enabled fetch of URL, with the mode being the state of the media element's crossorigin content attribute, the origin being the origin of the media element's Document, and the default origin behaviour set to fail. ]] I think this is problematic for several reasons: * There might not be a media element. * You might want to allow cross-origin fetching of the video but not of the tracks, or vice versa. I think it would be better to have a crossorigin attribute on <track> and let the track load algorithm look only at that.
We discussed this for a bit internally and concluded that the added flexibility with <track crossorigin> was not worth the added verbosity. To solve this: > * There might not be a media element. We suggest instead that <track> never loads if it doesn't have a media element as parent.
This bug was cloned to create bug 18216 as part of operation convergence.
So the idea is just to disable <track> _until_ it has a media element parent, but once it has one, to switch on the <track> element and leave it "on" even if the element is moved out again?
Yeah, there isn't much reason to kill a <track> if it gets moved out of its media parent. Just when the load starts, if it doesn't have a media element parent, stop the load algorithm. When a track element gets a new media element parent, it probably makes sense to rerun the load algorithm (like when src changes).
I made this change as part of wider track changes. Let me know if the spec looks good now or not.
It looks good. First I thought it would be better to read the crossorigin attribute before awaiting a stable state so that we don't need to check the parent again, but I realize that we probably want scripts to be able to set things in arbitrary order and have the same outcome, which means we have to await a stable state (<img> also does that).