15HTML5 Media

WHAT YOU WILL LEARN IN THIS CHAPTER:                

  • Playing audio and video natively in modern web browsers
  • Writing a custom control UI for media playback
  • Synchronizing your UI with the browser’s native controls
  • Parsing JSON back into actual objects and values you can use in your pages

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter at http://www.wiley.com/go/BeginningJavaScript5E on the Download Code tab. You can also view all of the examples and related files at http://beginningjs.com.

At its inception, the Internet was a text delivery system. Whereas the first HTML specification described the <img> tag for embedding images within a document, HTTP and HTML were designed primarily for transmitting and displaying text (hence, Hyper-Text).

In the late 1990s, personal computers were finding their way into more households, and ordinary people were able to access the web. Naturally, people wanted more from the web, and browser makers accommodated this by designing their browsers to use plug-ins, third-party applications that were designed to do things browsers normally didn’t, such as playing video and audio.Plug-ins solved a particular problem, but they weren’t without their faults—the largest being the need for so many of them. A wide variety of music and video formats were available, and certain plug-ins would only play certain formats. Stability was also an issue because a malfunctioning plug-in could crash ...

Get Beginning JavaScript, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.