HTML and CSS Reference
In-Depth Information
• Attach event handlers to provide user feedback, enable UI options, and start play-
• Use the <source> element to provide multiple videos in different formats to sup-
port all browsers
• Control video from JavaScript with the HTMLMediaElement interface
• Combine playing video with other web content
We'll show you the application and help you get your prerequisites in order, and then we'll
get you started building the basic video player.
8.1. Playing video with HTML5
Placing a video in HTML5 markup is simple, and no more complex for any given browser
than placing an image. In this section you'll take full advantage of the built-in browser sup-
port to build the simplest possible video jukebox.
We'll show you what the finished product will look like and help you get your prerequisites
aligned. Next, you'll lay the application's basic framework and then use the <video> ele-
ment to add videos to the web page.
8.1.1. Application preview and prerequisites
The sample player you'll be building in this chapter is shown in figure 8.1 .
Search WWH ::

Custom Search