News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Adding an audio player to smf with no restarting when switching pages

Started by elrond1369, April 18, 2012, 12:35:59 PM

Previous topic - Next topic

elrond1369

To do This you will need to get the player at: hxxp:www.boutell.com/xspf/ [nonactive]

You can use this code to test the player but you will need to Change all urls to your own for it to work

Open in new tab won't start multiple players because the player is only on the homepage and open in new tab doesn't open the homepage
This is my  playlist filename: test2.xspf

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1.1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track><location>http://www.novamooo.co.cc/newmenu.mp3</location><creator>Eden World Builder</creator><title>New Menu</title></track>
<track><location>http://www.novamooo.co.cc/track1.mp3</location><creator>Eden World Builder</creator><title>Track 1</title></track>
<track><location>http://www.novamooo.co.cc/track2b.mp3</location><creator>Eden World Builder</creator><title>Track 2</title></track>
<track><location>http://www.novamooo.co.cc/oldmenu.mp3</location><creator>Eden World Builder</creator><title>Old Menu</title></track>
<track><location>http://www.novamooo.co.cc/track3.mp3</location><creator>Eden World Builder</creator><title>Track 3</title></track>
<track><location>http://www.novamooo.co.cc/track4.mp3</location><creator>Eden World Builder</creator><title>Track 4</title></track>
</trackList>
</playlist>


This is the HTML just for the player filename: player.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head></head>
<body bgcolor="777777">

<object
  type="application/x-shockwave-flash"
  width="400" height="15"
  data="http://www.novamooo.co.cc/xspf_player_slim.swf?playlist_url=http://www.novamooo.co.cc/test2.xspf&playlist_size=6&repeat_playlist=1&shuffle=1&autoplay=1">
<param
  name="movie"
  value="http://www.novamooo.co.cc/xspf_player_slim.swf?playlist_url=http://www.novamooo.co.cc/test2.xspf&Shuffle_playlist=1&autoplay=1" />
</object>
</body>
</html>


And at last the frameset with the player at the top and the forum below it. Change the body bg-color to whatever you want. File name: index.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html><head><title>Eden World Builder Forum</title>
<frameset rows="22,*" FRAMEBORDER=NO FRAMESPACING=0 BORDER=0>
<frame src="player.htm" />
<frame src="http://www.novamooo.co.cc/forum/" />
</frameset>
</html>

Advertisement: