25.02.2013 Views

Peter Lubbers - Pro HTML 5 Programming

Pro HTML 5 Programming

Pro HTML 5 Programming

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.

CHAPTER 11 ■ THE FUTURE OF <strong>HTML</strong>5<br />

privileges. The obvious application for webcams is video conferencing, but there are many other<br />

amazing possibilities for computer vision in web applications including augmented reality and head<br />

tracking.<br />

Audio Data API<br />

<strong>Pro</strong>grammable audio APIs will do for what did for . Prior to the canvas tag, images<br />

on the Web were largely opaque to scripts. Image creation and manipulation had to occur on the<br />

sidelines—namely, on the server. Now, there are tools for creating and manipulating visual media based<br />

on the canvas element. Similarly, audio data APIs will enable music creation in <strong>HTML</strong>5 applications.<br />

This will help round out the content-creation capabilities available to web applications and move us<br />

closer to a self-hosting world of tools to create media on and for the Web. Imagine editing audio on the<br />

Web without having to leave the browser.<br />

Simple playback of sounds can be done with the element. However, any application that<br />

manipulates, analyzes, or generates sound on the fly needs a lower-level API. Text-to-speech, speech-tospeech,<br />

synthesizers, and music visualization aren’t possible without access to audio data.<br />

We can expect the standard audio API to work well with microphone input from the data element as<br />

well as files included with audio tags. With and an audio data API, you may be able to make an<br />

<strong>HTML</strong>5 application that allows users to record and edit sound from within a page. Audio clips will be<br />

able to be stored in local browser storage and reused and combined with canvas-based editing tools.<br />

Presently, Mozilla has an experimental implementation available in nightly builds. The Mozilla<br />

audio data API could act as a starting point for standard cross-browser audio programming capabilities.<br />

Video Improvements<br />

Earlier in this book, we described in detail the current capabilities of the element. While there is<br />

still no required video codec specified in <strong>HTML</strong>5, Google recently released WebM, a high-quality,<br />

royalty-free video codec for the Web. Although not all vendors have agreed to support WebM yet, there is<br />

significant momentum behind the format.<br />

Additionally, there is increased demand for improvements in the current controls for <strong>HTML</strong>5 video.<br />

In order to fully replace plugin-based rendering of video, <strong>HTML</strong>’s own control will need to introduce<br />

better APIs for streaming. Expect this capability to evolve in the next iterations of the media tags; with<br />

increased adoption of devices without Flash playback, such as the Apple iPad and iPhone, there is a<br />

significant incentive to bring Web video to a large audience with only <strong>HTML</strong>5.<br />

Touchscreen Device Events<br />

As Web access shifts ever more from desktops and laptops to mobile phones and tablets, <strong>HTML</strong>5 is also<br />

continuing to adapt with changes in interaction handling. When Apple introduced the iPhone, it also<br />

introduced into its browser a set of special events that could be used to handle multitouch inputs and<br />

device rotation. Although these events have not yet been standardized, they are being picked up by other<br />

vendors of mobile devices. Learning them today will allow you to optimize your web applications for the<br />

most popular devices now.<br />

263

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

Saved successfully!

Ooh no, something went wrong!