HTML5 Audio and Video   5 comments

Audio and Video

Over the past decade, video on the web has exploded. As bandwidth has increased, and more people have access to high speed internet connections the likes of YouTube and Vimeo have gripped the imagination of web users. Before HTML5, the most common method for including video on a webpage was to render it using Adobe Flash. YouTube and Vimeo continue to use this approach by default, but both have started migrating to a more accessible and standards friendly HTML5 version <video> tag. The HTML5 <video> tag, <audio> tag are fast becoming the method for presenting rich media content in a way that is compatible  with all devices,  including smartphones.

More recently, many vendors including Apple dropped support for Flash from their mobile devices. The HTML5 specification has long proposed native video and audio in the browser, as part of its aim to reduce the amount of code and work required to deploy common media types to the web. As with other HTML5 enhancements, direct embedding offers numerous accessibility benefits, and search engine indexing improvements over Flash.

The usage is simple: use a <video> tag to embed video,  and an <audio> tag to embed audio, and nest within the tag links to the different formats in which you have encoded your media.  There are two competing standards H.264 and WebM and many more for audio.

In order to use HTML5 to render video, you need to encode your video and audio into multiple formats and link to each format within the <audio> and <video> tags ensure every HTML5 capable browser will be able to render your media. For older browsers that do not support HTML5, it is also safe to use H.264 encoded video only and provide Flash as a fall back for those who don’t support H.264 files.

Both new tags allow for fallback content, which makes it a simple process to upgrade your existing Flash embed code to make use of HTML5 without excluding older browsers and no direct need for browser sniffing scripts.

Geolocation

The growing market for location-aware applications, where content is specifically oriented towards both the user and their current position. These apps take advantage of a hardware enhancement common to most smartphones running software from Apple, Google and Microsoft.  HTML5 offers us the ability to query the user’s location and tailor our web content accordingly.

The geolocation element of HTML5 is made available through an API, accessible with Javascript. The location isn’t dependant  upon the device accessing the page having a GPS chip, so any HTML5 capable browser with support for the geolocation API will attempt to locate the visitor using available means Wi-Fi networks, Bluetooth, RFID etc. The user has to explicitly choose to share their location through the API before any results are returned to the browser.

Current smartphones and tablets devices are typically running HTML5 engineered browsers, so are the most common devices able to use this functionality. You can request the user’s location with a few simple lines of Javascript code. The data is only useful if you do something with it like, a customised map that shows the location of nearest public convenience or a set of driving instructions to the office locations.

Translating the user’s location into something meaningful is made easier with the likes of OpenLayers, OpenStreetMap, Bing Maps or Google Maps, and each of these offers an API allowing you to pass in a location expressed in latitude and longitude.

Advertisements

5 responses to “HTML5 Audio and Video

Subscribe to comments with RSS.

  1. can you give us some tips on how you did to make your blog so popular? thanks a lot. lista de emails lista de emails lista de emails lista de emails lista de emails

  2. Really good job. Looking forward for more posts like this.

  3. Thanks for this I bookmarked it on my Stumbleupon account.

  4. this is a great post to check out. mestreseo mestreseo mestreseo mestreseo mestreseo

  5. just stumbled upon your blog and wanted to say that i have really enjoyed reading your blog posts. any way i’ll be subscribing to your feed and i hope you post again soon lista de emails lista de emails lista de emails lista de emails lista de emails

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: