HTML and CSS Reference
Try it out
Apart from the video playing automatically, the previous listing shouldn't work any dif-
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
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.
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.