Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

3. Multimedia Hacking > Hack 34. Use the Cuepoint.js Polyfill for Subtitles

Hack 34. Use the Cuepoint.js Polyfill for Subtitles

At the time of this writing, IE 10 is the only HTML5 browser that supports subtitles. This hack presents a great little polyfill that will bridge the gap on video tracks until browsers catch up with our needs.

If you have read any of the past few hacks, you probably realize how powerful the track element can be. Having a track of cues that accompany your video or audio files helps you to comply with the Americans with Disabilities Act (ADA), translate your files into multiple languages, and even simply enhance the message of your video.

From my perspective, track files are almost essential for audio and video within web applications. That being said, we have a problem because, at the time of this writing, all modern browsers support the HTML5 <video> and <audio> tags, but none support the use of subtitles with a track element. When an HTML5 feature isn’t natively available within our browser, we as developers rely on HTML5 polyfills (the use of JavaScript to backfill missing HTML5 functionality) to make the feature usable to all our users.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint