- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 10 Jun 2011 20:47:32 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv1421 Modified Files: spec.html the-iframe-element.html Log Message: Example of automatically showing a sign-language track when one is available (whatwg r6210) [updated by splitter] Index: the-iframe-element.html =================================================================== RCS file: /sources/public/html5/spec/the-iframe-element.html,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- the-iframe-element.html 9 Jun 2011 22:47:06 -0000 1.66 +++ the-iframe-element.html 10 Jun 2011 20:47:30 -0000 1.67 @@ -5071,6 +5071,40 @@ element</a>, even if another <a href="#media-resource">media resource</a> is loaded into the element: the objects are reused.</p> + </div><div class="example"> + + <p>In this example, a script defines a function that takes a URL to + a video and a reference to an element where the video is to be + placed. That function then tries to load the video, and, once it is + loaded, checks to see if there is a sign-language track available. + If there is, it also displays that track. Both tracks are just + placed in the given container; it's assumed that styles have been + applied to make this work in a pretty way!</p> + + <pre><script> + function loadVideo(url, container) { + var controller = new MediaController(); + var video = document.createElement('video'); + video.src = url; + video.autoplay = true; + video.controls = true; + video.controller = controller; + container.appendChild(video); + video.onloadedmetadata = function (event) { + for (var i = 0; i < video.videoTracks.length; i += 1) { + if (video.videoTracks.getKind(i) == 'sign') { + var sign = document.createElement('video'); + sign.src = url + '#track=' + video.videoTracks.getID(i); + sign.autoplay = true; + sign.controller = controller; + container.appendChild(sign); + return; + } + } + }; + } +</script></pre> + </div><h6 id="tracklist-objects"><span class="secno">4.8.10.10.1 </span><code><a href="#tracklist">TrackList</a></code> objects</h6><p>The <code><a href="#multipletracklist">MultipleTrackList</a></code> and <code><a href="#exclusivetracklist">ExclusiveTrackList</a></code> interfaces, used by the attributes defined in the previous section, are substantially similar. Their Index: spec.html =================================================================== RCS file: /sources/public/html5/spec/spec.html,v retrieving revision 1.1525 retrieving revision 1.1526 diff -u -d -r1.1525 -r1.1526 --- spec.html 9 Jun 2011 22:47:06 -0000 1.1525 +++ spec.html 10 Jun 2011 20:47:23 -0000 1.1526 @@ -322,7 +322,7 @@ <h1>HTML5</h1> <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2> - <h2 class="no-num no-toc" id="editor-s-draft-9-june-2011">Editor's Draft 9 June 2011</h2> + <h2 class="no-num no-toc" id="editor-s-draft-10-june-2011">Editor's Draft 10 June 2011</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -347,7 +347,7 @@ <a href="Overview.html">single page HTML</a>, <a href="spec.html">multipage HTML</a>, <a href="author/">web developer edition</a>. -This is revision 1.4976. +This is revision 1.4977. </p> <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2011 <a href="http://www.w3.org/"><abbr title="World Wide @@ -468,7 +468,7 @@ Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 9 June 2011 Editor's Draft. + This specification is the 10 June 2011 Editor's Draft. </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
Received on Friday, 10 June 2011 20:47:39 UTC