- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Wed, 25 May 2011 18:15:22 +1000
- To: Davy Van Deursen <davy.vandeursen@ugent.be>
- Cc: Media Fragment <public-media-fragment@w3.org>, Raphaël Troncy <raphael.troncy@eurecom.fr>
2011/5/18 Davy Van Deursen <davy.vandeursen@ugent.be>: > Silvia, > > On 18/05/2011 3:18, Silvia Pfeiffer wrote: >> >> Nice work! >> >> I've spotted some remaining occurrences of "id": >> section 5.2.3: >> Accept-Ranges: bytes, t, track, id >> >> section 6.2.1 >> (i.e., t, xywh, track, and id) > > Thanks for catching these, I will correct them. > >> Further on a note that Davy put into 4.2.3 Track Dimension: >> "We can also reference the HTML5 Media Multitrack API here, when it's >> mentioned in the HTML5 spec. " >> -> yes, we absolutely should >> Do you want me to formulate an example? > > Yes, please do! I don't have the latest version of the spec checked out, so I'll post it here. HTML5 media has a discovery mechanism for retrieving the track names of a media resource through the audioTracks, videoTracks, and textTracks IDL attributes of the HTMLMediaElement. For example, to discover all the names of the available tracks of a video resource, you may want to use the following JavaScript excerpt. <video id="v1" src="video" controls> </video> <script type="text/javascript"> var video = document.getElementsByTagName("video")[0]; var track_names = []; var idx = 0; for (i=0; i< video.audioTracks.length; i++, idx++) { track_names[idx] = video.audioTracks.getLabel(i); } for (i=0; i< video.videoTracks.length; i++, idx++) { track_names[idx] = video.audioTracks.getLabel(i); } for (i=0; i< video.textTracks.length; i++, idx++) { track_names[idx] = video.textTracks[i].label; } </script> I think this is correct, but would appreciate somebody cross-checking. Cheers, Silvia.
Received on Wednesday, 25 May 2011 08:16:10 UTC