25.02.2013 Views

Peter Lubbers - Pro HTML 5 Programming

Pro HTML 5 Programming

Pro HTML 5 Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

84<br />

CHAPTER 3 ■ WORKING WITH <strong>HTML</strong>5 AUDIO AND VIDEO<br />

The stopTimeline handler will be called when another of our video handlers—onended—is triggered<br />

by the completion of video playback.<br />

Our video timeline is probably not full-featured enough to satisfy power users, but it took only a<br />

short amount of code to accomplish. Now, on with the show.<br />

Practical Extras<br />

Sometimes there are techniques that don’t fit into our regular examples, but which nonetheless apply to<br />

many types of <strong>HTML</strong>5 applications. We present to you some short, but common, practical extras here.<br />

Background Noise in a Page<br />

Many a web site has attempted to entertain its viewers by playing audio by default for any visitors. While<br />

we don’t condone this practice, <strong>HTML</strong>5 audio support makes it quite easy to achieve this:<br />

<br />

<br />

<br />

Background Music<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!