Web Design: How To Create A Sleek Web Audio Player Back


    I still remember in the early 2000s when playing rich media (audio and video) online came with a lot of constraints. It’s easy to take the beginnings for granted, especially since today, we have manyoutlets to play audio i.e. last.fm or play video such as Youtube.

    In this post, as the title implies, we are going to create Web Audio Player. If you are running a website for podcasting and want to create a media player that will suit your overall web design, this post is probably for you.

    Here is how our audio player is going to be look like, as inspired from this design at Dribbble.

    Recommended Reading: HTML5 Videos: 10 Things Designers Need To Know

    What We Need

    Before we create the audio player, we need to prepare some key items for it: the jPlayerjQueryand a font icon set called FontAwesome.

    First of all, let’s download the jPlayer. The jPlayer is a jQuery Plugin that allows us to run rich media on our web page without a hassle. As long as you can HTML and CSS you are ready to go.

    Recommended Reading: Check out our HTML/CSS3 tutorials.

    jPlayer is essentially a jQuery plugin, thus we also need to download the jQuery for it to work, and at the time of the writing jQuery is currently at version 1.8.2. We also need some icons for the media player GUI, and this time we will be using FontAwesome to deliver the icons.

    After that, we extract all the downloaded files and put all the stuff, including the jPlayer files, the jQuery and the Fonts in an appropriate folder. Then link jquery.js and jquery.jplayer.min.jsto the html document, as follow.

    1. <link rel="stylesheet" href="css/normalize.css">  
    2. <link type="text/css" href="css/style.css" rel="stylesheet" />  
    3. <script type="text/javascript" src="js/jquery.js"></script>  
    4. <script type="text/javascript" src="js/jquery.jplayer.min.js"></script>  

    As you can see, in addition to jQuery and jPlayer library, we’ve also linked two CSS files in there. The first one normalize.css will reset or normalize the browser’s styles, so our web page will be rendered more consistently across the browsers, whilst the second one, style.css is where we put our main styles.

    The Audio

    For demonstration in this tutorial, we are going to use the audio from Kelli Anderson from her presentaion at TEDx Pheonix. Well, it is actually a video, but you can extract the audio only either through one of the following tools, Easy Youtube Downloader (FF Extension) or KeepVid.com.

    Structuring The HTML Markup

    Now, it’s time to structure the HTML markup for the audio player and below are the HTML markup we need. The important thing from this markup is the id=jquery_jplayer_1 attribute that is assigned in the div that contains all these. This id is used to link this structure to jPlayer later on through jQuery function.

    Furthermore, all the classes assigned on the following structure, including jp-playjp-pausejp-mute and jp-unmute are all the standard classes used in jPlayer. I suggest that you don’t change these classes as well as the id attribute to make things easier for when we style the audio player later on (unless you really know what you are doing).

    1. <div id="jquery_jplayer_1" class="jp-jplayer"></div>  
    3. <div id="jp_container_1" class="jp-audio">  
    4.   <div class="jp-type-single">  
    6.     <div class="jp-title">  
    7.       <ul>  
    8.         <li>TEDxPhoenix - Kelli Anderson - Disruptive Wonder for a Change</li>  
    9.       </ul>  
    10.     </div>  
    12.     <div class="jp-gui jp-interface">  
    14.         <ul class="jp-controls">  
    15.           <li><a href="javascript:;" class="jp-play" tabindex="1">&#61515;</a></li>  
    16.           <li><a href="javascript:;" class="jp-pause" tabindex="1">&#61516;</a></li>  
    17.           <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">&#61480;</a></li>  
    18.           <li><a href="javascript:;" class="jp-unmute" tabindex

      Referral Url : Click