Create a URL to a song

Need help? Post your questions here.

Moderator: moderators

Create a URL to a song

Postby kapz » Fri Jul 10, 2009 6:48 pm

Hi Sindre,

I have a need to share a song with someone, but don't necessarily want to create an account and explain where to find the song.

Can I simply embed subsonic's web player on a webpage for one song (stopped of course) or a link which just streams one song? I don't want the user to see the rest of my collection. Could you provide some assistance if this is possible?

Thanks so much

P.S. I can read code.
Paid Subsonic user
----
Love my unRaid (~9.5TB): [url=http://lime-technology.com/forum/index.php?topic=2031.msg40351#msg40351]Pictures Here (Reply #82)[/url]
User avatar
kapz
 
Posts: 124
Joined: Wed Jun 21, 2006 7:23 pm

Postby sindre_mehus » Sat Jul 11, 2009 8:12 am

It's technically possible, although not very simple.

To get the stream URL of a given song, set your player settings to "External with playlist", then play the song. Go to your external player and find the URL there. (Typically by looking at the properties of the currently playing song).

Now you can use any web-based player to stream that song, for instance http://www.longtailvideo.com/players/jw-flv-player/

Hope this helps :-)
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby kapz » Sat Jul 11, 2009 8:07 pm

Thanks for link to the open source video player. The external player URL wasn't working for me, but since I have Apache installed I was able to make my own html page on my server and get it working for my needs. I only want to share a few songs.

Code: Select all
<script type="text/javascript" src="swfobject.js"></script>

<div id="player">This text will be replaced</div>

<script type="text/javascript">
var so = new SWFObject('player.swf','mpl','314','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=Air - All I Need.mp3&image=Air - Moon Safari (F).jpg&stretching=exactfit');
so.write('player');
</script>


The URL I was using for &file= parameter above did not work for me.

Code: Select all
http://[IP ADDRESS]:22888/subsonic/stream?player=1&pathUtf8Hex=4f3a5c4d555349435f4d4f52455c434420415243484956455c4169725c416972202d204d6f6f6e205361666172695c303320416c6c2049204e6565642e6d7033&suffix=.mp3
Last edited by kapz on Sun Jul 12, 2009 9:02 pm, edited 1 time in total.
Paid Subsonic user
----
Love my unRaid (~9.5TB): [url=http://lime-technology.com/forum/index.php?topic=2031.msg40351#msg40351]Pictures Here (Reply #82)[/url]
User avatar
kapz
 
Posts: 124
Joined: Wed Jun 21, 2006 7:23 pm

Postby nublet » Sun Jul 12, 2009 8:58 pm

wish that made any sense to me lol
nublet
 
Posts: 10
Joined: Sat Jul 11, 2009 8:48 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 20 guests