22.07.2013 Views

Working with HTML5 Audio and Video - Scf

Working with HTML5 Audio and Video - Scf

Working with HTML5 Audio and Video - Scf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

84<br />

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

The stopTimeline h<strong>and</strong>ler will be called when another of our video h<strong>and</strong>lers—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 <strong>with</strong> 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>HTML5</strong> 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>HTML5</strong> 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!