Audio previews like iTunes, Amazon Music.

Discussion in 'Web Design and Development' started by markfc, Jul 2, 2015.

  1. markfc macrumors 6502a

    markfc

    Joined:
    Sep 18, 2006
    Location:
    Prestatyn, Wales, UK
    #1
    Hi,

    I have a table with a list of songs, next to each song I want to put a play button which will play the associated .MP3

    I've tried the html 5 audio controls ;

    <audiocontrols>
    <sourcesrc="horse.mp3"type="audio/mpeg">
    Your browser does not support the audio element.
    </audio>

    Which work great but each row of the table ends up with a full media player which looks messy.

    How can I get just the play button, similar to how iTunes and Amazon Music do it?

    Thanks
     
  2. D.T. macrumors 603

    D.T.

    Joined:
    Sep 15, 2011
    Location:
    Vilano Beach, FL
    #2
    You want the html5 audio, but with your own styling (vs. the default browser audiocontrols UI), then you'll need some JS to trigger the audio API - I'd look into something like JPlayer, where they'd done most of that work for you :)

    http://www.jplayer.org/
     

Share This Page