Book Image

HTML5 iPhone Web Application Development

By : Alvin Crespo
Book Image

HTML5 iPhone Web Application Development

By: Alvin Crespo

Overview of this book

<p>Create compelling web applications specifically tailored for distribution on iOS Safari. Work through real world examples with references, and in-depth discussions on the approach; including its benefits and drawbacks.<br /><br />"HTML5 iPhone Web Application Development" strives to teach all levels of developers, beginners and professionals, the process of creating web applications for iOS Safari. Utilizing current industry standards for frontend development, learn to take advantage of HTML5, CSS3 and JavaScript to create compelling software.<br /><br />Start with reviewing current industry standards for frontend development, and end with creating a native application using the same codebase.</p> <p>Your journey will begin with an overview of current industry standards for frontend technology, quickly moving to solve real world issues; from creating a resizable or responsive gallery, to creating a single page application that utilizes the popular Backbone.js framework.</p> <p>"HTML5 iPhone Web Application Development" aims to make you an expert in developing web applications for the iOS Safari platform.</p>
Table of Contents (17 chapters)
HTML5 iPhone Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Simple HTML5 audio integration


Including audio on a page is pretty simple. We can just include the following markup in the page and we have an audio player instantly:

<audio controls>
    <source src="../assets/mymusic.mp3" type='audio/mpeg; codecs="mp3"'/>
    <p>Audio is not supported in your browser.</p>
</audio>

The audio element

The preceding example specifies an audio element with an attribute of controls telling the browser to have an audio player with native controls for playback. Inside this element, there is a source element and a paragraph element. The source element specifies the source of the audio and its type. The attribute src on the source element is the relative location of the audio, and the type attribute specifies the MIME type and codec of the source. Lastly, we have a paragraph element, just in case the audio element is not supported.

This example is perfect to demonstrate how easy it is to have media on our pages, except it's not always as...