The examples shown here use the HTML5 track element, and show you how to add video with captioning and other features to your webpages.
The first example shows a simple HTML-only solution, the video and track element are added to a webpage to provide a multi-language subtitled video, without the need for additional software or scripting. The user can click the closed caption button on the player and switch between tracks.
The second example uses scripting and the track API to get and display the list of tracks that are associated with the video. This shows how to programmatically discover which tracks are available with a video.
The third example shows how to get and display the text cues (captions or subtitles) using the activeCues property and the cuechange event. The default behavior that displays the text in the video player is suppressed by setting the kind attribute to metadata on the track. The captions are then displayed in a styled div tag below the video.
The last example uses two tracks, one for subtitles, and the other for a slide show of URLs. The first track’s kind attribute is set to subtitles and the second track’s kind attribute is set to metadata. This tells the video player to not display the text in the second track. To ensure both tracks are active, the text track is set to default, and the mode property is set to HIDDEN to make the metadata track active. As the video plays, the captions are displayed in the video player, and the URLs, by way of the metadata track, are assigned as the src property for an iframe element. The result is a video that has a companion slide show of live webpages that are related to the video.
Reference
video object
TextTrack object
TextTrackCue object
textTracks property
activeCues property
kind property
mode property
cuechange event
iframe element
src attribute
Conceptual
Add audio and video to your webpage
Internet Explorer 10 Developer Guide: HTML5 Video timed text tracks
Internet Explorer Test Drive
HTML5 Video Caption Maker
IEBlog
HTML5 Video Captioning
Internet Explorer Testing Center
HTML Audio/Video Elements
The Internet Explorer Samples Gallery contains a variety of code samples that demonstrate new features available in Internet Explorer. These downloadable samples are provided as compressed ZIP files that contain the HTML, JavaScript, CSS, and image resources for the sample, along with the license agreement and sample description metadata. After you’ve downloaded and unzipped the compressed files, the sample files can be found in the following location:
(unzipped folder)\HTML,JavaScript\Website \(Sample)
This sample is provided as-is in order to indicate or demonstrate the functionality of the feature APIs for Internet Explorer 10. We appreciate your comments and questions on this sample!
For download info, visit Internet Explorer downloads.