...

View Full Version : JW FLV Player to Stream Audio from 3rd Party



Rowsdower!
01-21-2009, 02:02 PM
I'm trying to get a Cumulus radio station to stream on my desktop webpage while I'm at work using the JW FLV player. I had been using WMP up to now and this type of URL:
http://player.cumulusstreaming.com/Stations/WXKR-FM/PubPoint.asx?PubPtASXStrng
but the FLV player won't accept this URL.

So my first and most pressing questions is this:

Is it even possible to stream like this in the FLV player from the URL stream I have listed? Do I need to list a file extension at the end of the URL? The JW FLV player is supposed to play a ton of filetypes but I don't know how to tell what filetype exists at the link above (looks like maybe a WMA file? I know these aren't supported so hopefully I'm wrong).

I can't find much support on the streaming issue on the longtail site. They seem to assume most users would be streaming their own content (which is a reasonable assumption but doesn't help me at all) so I'm a bit lost. As you can see I'm not brilliant with media embedding... Any help is appreciated!

_Aerospace_Eng_
01-21-2009, 05:04 PM
I think it is. Go to their site and type in asx in the search box. You'll get some results many of people trying to do the same but there are a few suggestions that might work for you.

Rowsdower!
01-23-2009, 01:49 PM
OK, I have just moved over to using the JW WMV player (plays WMA also, which is exactly what I needed). I have my menu structure working well with this new player. For posterity (incase anyone else is looking for the same solution) I have outlined my solution below. If you don't care to read this then please skip to the part below the green text because I still have an issue that I would like to resolve.





This is the script I am using in the header when I change radio stations:


<script type="text/javascript">
function radioswitch(station){
var elm = document.getElementById('radioplayer');
var src = '/ssrp/embed/wmvplayer.xaml';
var cfg = {
file: station,
width:'250',
height:'20',
autostart:'true',
volume:'25'
};
var ply = new jeroenwijering.Player(elm,src,cfg);
}
</script>

The player (and initially empty file source just to populate the div with a player) is stored here:
<div style="position: relative;top: 0px;left: 175px; width:250px;"> <!-- Open Player -->
<div id="radioplayer">the player will be placed here</div>
<script type="text/javascript">
var elm = document.getElementById("radioplayer");
var src = '/ssrp/embed/wmvplayer.xaml';
var cfg = {
file:'',
width:'250',
height:'20',
volume:'10'
};
var ply = new jeroenwijering.Player(elm,src,cfg);
</script>
<br>Now Playing: <span id="radionowplaying">--</span>
</div> <!-- Close Player -->

Then my menu appears in a <ul> with menu items grouped into genre categories. Individual stations are listed like this:
<li><input id="rock5" onclick="highlight(rock5);radionowplaying(rock5);radioswitch('http://player.cumulusstreaming.com/Stations/WXKR-FM/PubPoint.asx?PubPtASXStrng');" type="button" name="music" value="94.5 WXKR (Toledo, Rock)" /></li>

Basically I am rewriting the entire player with each station change because with 71+ stations in my menu I don't want to use the default tracklist with an XML directory of the stations. That would be a pain to find the right station in a straight scroll-through menu.

When a station is played the end result looks something like the thumbnail below. There is also a video player, but this is on a separate setup with <div id="videoplayer">...

Anyway, the problem I am having now is that I would like to preserve the player's current volume level in between station changes. Is there a way to capture this in a variable on each call of radioswitch at the very beginning so that I don't have to default back to 25% every time? I know how to implement the preserved volume once it has been determined but I don't how how to actually grab it from the player. I imagine there has to be a way to do it but I can't even begin to guess what it would be.

Any thoughts or experience with this?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum