HTML5 MP3 Player Support Product Page

Multiple Players on One Page?

Asked 10 Dec 2010 20:30:11
1
has this question
10 Dec 2010 20:30:11 Robert Robinette posted:
I have a database table of mp3s that I'd like to display in a list with each having its own html5 button/player - can you have more than one on the page?

Replies

Replied 11 Dec 2010 00:50:42
11 Dec 2010 00:50:42 George Petrov replied:
Hi Robert,

You can have indeed as many players as you wish on the same page.

In your situation however I will suggest one player with the supplied playlist CSS preset that will just give all the mp3 links play/pause buttons separately.

Greetings,
George
Replied 11 Dec 2010 07:00:18
11 Dec 2010 07:00:18 Robert Robinette replied:
Ok. Thanks for the help. I'll give that a try.
Replied 11 Dec 2010 21:21:35
11 Dec 2010 21:21:35 Robert Robinette replied:
What I'm trying to do is exactly what you suggested - generate a playlist from a recordset of mp3 links and give each controls. I've been unable to make it work so far.

Can you elaborate a little more on using the player this way? It would be greatly appreciated.
Replied 11 Dec 2010 22:46:34
11 Dec 2010 22:46:34 Robert Robinette replied:
Ok. I think I have it! The only issue left is that I'm using an image as the play button. Is there a way to change the image to a different image (a pause symbol) when pressed? Rather than have a play and pause button side by side?

Here is my playlist code:

<div class="dmxHTML5MP3PlayerPlaylist">
<ul>
  <?php do { ?>
    <li>
      <div><?php echo $row_Recordset1['title']; ?></div>
      <div><?php echo $row_Recordset1['description']; ?></div>
      <div><a href="<?php echo $row_Recordset1['mp3Link']; ?>"><img src="playButton.jpg" width="25" height="25" /></a></div>  
  </li>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</ul>
</div>


Replied 17 Dec 2010 10:03:38
17 Dec 2010 10:03:38 Teodor Kuduschiev replied:
Hello Robert,
Yes there is a way:
Simply use: HTML5 MP3 Player Buttons as links
it will insert the following code:

<div class="dmxHTML5MP3PlayerControlbar"> <a href="#" class="dmxHTML5MP3PlayerBtnPrev">Prev</a> <span class="dmxHTML5MP3PlayerPlayPause"> <a href="#" class="dmxHTML5MP3PlayerBtnPlay">Play</a> <a href="#" class="dmxHTML5MP3PlayerBtnPause">Pause</a> </span> <a href="#" class="dmxHTML5MP3PlayerBtnStop">Stop</a> <a href="#" class="dmxHTML5MP3PlayerBtnNext">Next</a> </div>


So you can just replace these two link texts (Play/Pause):

<a href="#" class="dmxHTML5MP3PlayerBtnPlay">Play</a> 
<a href="#" class="dmxHTML5MP3PlayerBtnPause">Pause</a>


With images, and as they are located within the

<span class="dmxHTML5MP3PlayerPlayPause"></span>

They will be displayed as one image, changing when clicked.

Reply to this topic