TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,058
  • Total Topics: 21,338
  • Online today: 201
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 218
  • Total: 219
  • lurkalot

XSPF music player

Started by Greenbug, September 02, 2006, 09:59:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Greenbug

I actually put this into a HTML block,

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="400" height="168" >
        <param name="allowScriptAccess" value="sameDomain"/>
        <param name="movie" value="http://www.name.com/folder/xspf_player.swf"/>
        <param name="quality" value="high"/>
        <param name="bgcolor" value="#E6E6E6"/>
    <embed src="http://www.name.com/folder/xspf_player.swf?playlist_url=playlist.xspf"
    quality="high" bgcolor="#E6E6E6" name="xspf_player" allowscriptaccess="sameDomain"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    align="center" height="168" width="400"> </embed>
</object>




FTP'd the files below into the http://yoursite.com/"folder" folder and it works great. Has 456 songs also?

This rocks!

If you want to use the default play list you can embed it also using the same files and this is a block! nice and tidy

<center>
<embed width="170" height="180" autostart="0" controltype="1" showcontrols="1" src="http://www.site.com/xspf_player.swf">
</embed></center>



There is a help file located in the download if anyone can master the playlist creation on there own please share that info

Xarcell


Greenbug

#2
I did a search didnt find the post, I didnt see it in the snippet index either, sorry.

I have this working in SMF and TP

Cheers,

GB

Still working on my own custom playlist.

Xarcell

It was a long time ago. It wasn't posted as a block code snippet, but as a php article.

Greenbug

#4
Well I cant figure out how to create my own paylist.  :uglystupid2: I created the playlist.xspf file everything looks good but it still defaults to the default list.

The article at that web page, said it would.

This is what I am using

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns = "http://xspf.org/ns/0/">
  <trackList>
   <track>
    <location>http://www.site.org/folder/BeastieBoysGirls.mp3</location>
    <image>http://www.site.org/folder/BeastieBoys.jpg</image>
    <annotation>Beastie Boys - Girls</annotation>
   </track>
  <track>
    <location>http://www.site.org/folder/BeastieBoysGirls.mp3</location>
    <image>http://www.site.org/folder/BeastieBoys.jpg</image>
    <annotation>Beastie Boys - Girls</annotation>
   </track>
 
  </trackList>
</playlist>


This is what it says, here  as an example http://www.ic.sunysb.edu/stu/ahanley/music/help.htm#createPlaylist


<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns = "http://xspf.org/ns/0/">
  <trackList>
   <track>
    <location>http://www.name.com/folder/song.mp3</location>
    <image>http://www.name.com/folder/picture.jpg</image>
    <annotation>Text to be displayed</annotation>
   </track>
   <track>
    <location>http://www.name.com/folder/song2.mp3</location>
    <image>http://www.name.com/folder/picture2.jpg</image>
    <annotation>Text to be displayed</annotation>
   </track>
  </trackList>
</playlist>


Not that i am complaining 456 sons seems it would satisfy almost everyone, they all work also, some take longer to load then others though.

Greenbug

#5
There is this also that alows picture of the album cover to be displayed, still working on my own playlist though.

This is pretty slick though.



<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="170" id="xspf_player" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://musicplayer.sourceforge.net/xspf_player.swf?playlist_url=http://cchits.ning.com/recent/xspf/?xn_auth=no&autoload=true" />
<param name="quality" value="high" />
<param name="bgcolor" value="#e6e6e6" />
<embed src="http://musicplayer.sourceforge.net/xspf_player.swf?playlist_url=http://cchits.ning.com/recent/xspf/?xn_auth=no&autoload=true" quality="high" bgcolor="#e6e6e6" width="400" height="170" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


This will also just open into its own window and play, but I dont see a ".xspf" playlist just a ?xn_auth=no&autoload=true

http://musicplayer.sourceforge.net/xspf_player.swf?playlist_url=http://cchits.ning.com/recent/xspf/?xn_auth=no&autoload=true

The attached is the actual playlist from the link above. Open it in notepad or tswebeditor

resources for playlist creation
http://www.ic.sunysb.edu/stu/ahanley/music/help.htm

&

http://musicplayer.sourceforge.net/#documentation

parameters:
playlist_url : the url of the xspf file to load
autoplay : boolean value that make the music start without the initial user click
autoload : boolean value that make the playlist load without the initial user click
repeat_playlist : boolean value that make the repeats the playlist after the end of the last song playlist_size : number of tracks to limit
player_title : the text to replace the players default's
info_button_text : the text to display on the info link.
radio_mode : boolean value, if true tells the player that the last track of playlist is in real a new playlist location.

The music player can also be used to play single mp3 files instead of playlists, the parameters are:
song_url : the url of the single mp3 you want to play
song_title : the text to replace the players default's

This would be perfect in a popup window, but I havent yet figured that out either.

Ianedres

Quote from: Greenbug on September 03, 2006, 01:16:36 AMThis would be perfect in a popup window, but I havent yet figured that out either.

I've used this player for approximately 1 year now; I use the following javascript to open a new window (actually a pop-under) on a non-SMF/TP site with the code embedded in the page 'jukebox.htm'.


<script type="text/javascript">
var win=window.open("http://xitearth.kicks-ass.org/media/jukebox.htm",null,"height=275,left=330,location=no,status=no,resizeable=yes")
win.blur()
window.focus()
</script>


Side note: I had placed my .mp3 files on a free server with unlimited bandwidth, so as to load quickly and without using bandwidth on my end. The .xpsf playlist allows the files to be linked via http off of any server, as long as you use the correct path to the file.  8)

So this part of the .xpsf file:
<location>http://www.yourserver.com/path_to_mp3/song.mp3</location>

could also be:
<location>http://www.THEIRserver.com/path_to_mp3/song.mp3</location>

Cheers.  :coolsmiley:





This website is proudly hosted on Crocweb Cloud Website Hosting.