How to use HTML5 audio (part 2)

This is part two of the HTML5 audio introduction video; if you haven’t watched it already, I recommend checking out part one to get up to speed!

Today, we’ll be working on our HTML5 audio player and adding some exciting functionality to really bring our HTML5 player to life. We’ll be using a method involving data attributes, which allow for easy access to custom values for each audio element, and that’s where our titles, artists and album art come in.

By the end of this tutorial, you’ll understand the following: “Tagging” your audio elements with custom data attributes; such as track title, artist and even album art; using jQuery to manipulate this information and display it on the page, with the flexibility to style it around your own designs.

I’ll also be demonstrating my player example, and talking through how to accomplish certain effects with your data; including displaying the album art as a glossy backdrop to your player.

Have you featured HTML5 audio in a project? How does HTML5 audio compare with older options? Let us know your thoughts in the comments.

Featured image/thumbnail, sound image via Shutterstock.

Sam Piggott

Sam Piggott

Sam Piggott is a young digital designer and self-confessed jack-of-all-trades from London, UK. When he's not designing/coding/drinking copious amounts of coffee, Sam loves learning new software and air-drumming to whatever's on Spotify. Follow him on twitter @Sam_Piggott.

Join to our thriving community of like-minded creatives!