HTML and CSS Reference
In-Depth Information
Try it out
Apart from the video playing automatically, the previous listing shouldn't work any dif-
ferently from listing 8.4 , which allowed you to switch between videos. But if you open up
your browser's console, you should see output similar to that shown in the following listing
(exact values may vary from browser to browser).
Listing 8.6. Console output from listing 8.5
loadedmetadata
networkState: 1
readyState: 4
loadeddata
networkState: 1
readyState: 4
canplay
networkState: 1
readyState: 4
canplaythrough
networkState: 1
readyState: 4
Remember that networkState: 1 is NETWORK_IDLE and readyState: 4 is
HAVE_ENOUGH _DATA . With all of the videos on local disk you shouldn't expect too
much else, although you may see a networkState of 2 on IE. If you have some larger
videos online, you should see some different values in each event.
Progress check!
If you've been following along in Chrome, Safari, or IE9 as we recommended at the start
of this chapter, you should now have a simple interface, which allows you to click a list of
videos and see them play. Figure 8.4 shows what you should be seeing; compare your code
to the file index-2.html in the chapter's code download if you're having any problems.
Search WWH ::




Custom Search