SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting up HTML5 Audio Player

    How do I output the song title when it plays in my player instead of having it just say "Song Name by Artist"
    Also I'm having trouble figuring out how to hook up the next song button.
    Here's the site live: http://test.shibagames.com

    Code:
    music.js
    var xml = '' + 
    '<?xml version="1.0"?>\n' + 
    '<music>\n' + 
    '	<composition>\n' + 
    '		<title>First Song</title>\n' + 
    '		<composer>Puccini</composer>\n' + 
    '		<time>2:12</time>\n' + 
    '		<filename>maid.mp3</filename>\n' + 
    '	</composition>\n' + 
    '	<composition>\n' + 
    '		<title>Second Song</title>\n' + 
    '		<composer>Joe</composer>\n' + 
    '		<time>2:22</time>\n' + 
    '		<filename>Sleep Away.mp3</filename>\n' + 
    '	</composition>\n' + 
    '	<composition>\n' + 
    '		<title>Third Song</title>\n' + 
    '		<composer>Gershwin</composer>\n' + 
    '		<time>2:57</time>\n' + 
    '		<filename>Kalimba.mp3</filename>\n' + 
    '	</composition>\n' + 
    '	<composition>\n' + 
    '		<title>2:57</title>\n' + 
    '		<composer>Smith</composer>\n' + 
    '		<time>2:57</time>\n' + 
    '		<filename>gershwin.mp3</filename>\n' + 
    '	</composition>\n' + 
    '	<composition>\n' + 
    '		<title>Allegro</title>\n' + 
    '		<composer>Beethoven</composer>\n' + 
    '		<time>3:45</time>\n' + 
    '		<filename>piano.mp3</filename>\n' + 
    '	</composition>\n' + 
    '</music>\n';
    Last edited by Pullo; Feb 7, 2014 at 09:52. Reason: Added code tags


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •