Old 17th September 2004, 14:22   #1
Ken Rayner
Junior Member
 
Join Date: Sep 2004
Location: Wiltshire, England
Posts: 9
Windows Media Player playing Shoutcast

Hi - I promise I've searched and searched on this... but can't find the answer.

The problem is this - I'm embedding a Windows Media Player to play a SHOUTcast stream. It works on my PC, works on a number of others - but doesn't work on a bunch of others - even ones with the same version of WMP.

Here's the code:

<!-- Check Media Player Version -->

<SCRIPT LANGUAGE="JavaScript">

var WMP7;

if ( navigator.appName != "Netscape" ){
WMP7 = new ActiveXObject('WMPlayer.OCX');
}

// Windows Media Player 7 Code
if ( WMP7 )
{
document.write ('<OBJECT ID=MediaPlayer ');
document.write (' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6');
document.write (' standby="Loading Microsoft Windows Media Player components..."');
document.write (' TYPE="application/x-oleobject" width="320" height="60">');
document.write ('<PARAM NAME="url" VALUE="mix.asx">');
document.write ('<PARAM NAME="AutoStart" VALUE="true">');
document.write ('<PARAM NAME="ShowControls" VALUE="1">');
document.write ('<PARAM NAME="uiMode" VALUE="mini">');
document.write ('</OBJECT>');
}

// Windows Media Player 6.4 Code
else
{
//IE Code
document.write ('<OBJECT ID=MediaPlayer ');
document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ');
document.write ('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ');
document.write ('standby="Loading Microsoft Windows Media Player components..." ');
document.write ('TYPE="application/x-oleobject" width="320" height="60">');
document.write ('<PARAM NAME="FileName" VALUE="mix.asx">');
document.write ('<PARAM NAME="AutoStart" VALUE="true">');
document.write ('<PARAM NAME="ShowControls" VALUE="1">');

//Netscape code
document.write (' <Embed type="application/x-mplayer2"');
document.write (' pluginspage="http://www.microsoft.com/windows/windowsmedia/"');
document.write (' filename="mix.asx"');
document.write (' src="mix.asx"');
document.write (' Name=MediaPlayer');
document.write (' ShowControls=1');
document.write (' ShowDisplay=1');
document.write (' ShowStatusBar=1');
document.write (' width=320');
document.write (' height=60>');
document.write (' </embed>');

document.write ('</OBJECT>');
}

</SCRIPT>

What happens on the machines that it doesn't work is that it appears to go and try to open the file, connect, but then stop before the "buffering" bit. The error comes up as "The server received invalid data from the client on the control connection".

As I say - it works on some, not on others. Any help appreciated.
Ken Rayner is offline   Reply With Quote
Old 17th September 2004, 19:21   #2
djmastermind
Forum King
 
djmastermind's Avatar
 
Join Date: Jul 2003
Location: Houston, TX
Posts: 6,813
Just a guess: Maybe there's issues with file associatoins on the machines that don't work?

-- Michael
djmastermind is offline   Reply With Quote
Old 17th September 2004, 22:21   #3
Ken Rayner
Junior Member
 
Join Date: Sep 2004
Location: Wiltshire, England
Posts: 9
Yeah, I thought that too... but what *is* the file that Windows Media plays?

So you've got:

http://server:8000/

What is the actual file that Windows Media Player pulls down? It's not the .pls obviously... but it must be something - anyone know?

Ta.
Ken Rayner is offline   Reply With Quote
Old 17th September 2004, 22:26   #4
djmastermind
Forum King
 
djmastermind's Avatar
 
Join Date: Jul 2003
Location: Houston, TX
Posts: 6,813
Try creating a .asx file and telling WMP to open it:

For the .asx (WMP).. put the following in a notepad document and then save it as <whatever>.asx


code:
<asx version="3.0">
<title>TITLE</title>
<entry>
<title>TITLE</title>
<author>AUTHOR</author>
<ref href="http://yourIP:yourPORT/"/>
</entry>
</asx>




Of course, change things to fit your needs.
Note: This only works in WMP 7.1 and up
Note the trialing slash after "yourPORT"

Simply upload those to your webserver and tell the embedded WMP to open that file.

-- Michael
djmastermind is offline   Reply With Quote
Old 17th September 2004, 22:29   #5
Ken Rayner
Junior Member
 
Join Date: Sep 2004
Location: Wiltshire, England
Posts: 9
Hey, thanks... yep, did that. It does the same thing both ways, with the .asx file and the direct link. Another detail which *may* be useful - the DNAS server is on a W2K box (sorry)... I notice lots about MIME types on the forum, but I'm guessing it must be ok because it works *sometimes*. Hmmm.
Ken Rayner is offline   Reply With Quote
Old 17th September 2004, 22:31   #6
djmastermind
Forum King
 
djmastermind's Avatar
 
Join Date: Jul 2003
Location: Houston, TX
Posts: 6,813
It may have to do with MIME types on either the server or the browser, yes.

Please link me to the page with the embedded WMP.

-- Michael
djmastermind is offline   Reply With Quote
Old 17th September 2004, 22:36   #7
Ken Rayner
Junior Member
 
Join Date: Sep 2004
Location: Wiltshire, England
Posts: 9
Sure, thanks...

http://217.199.183.155/stations/mix96/test_player.htm
Ken Rayner is offline   Reply With Quote
Old 17th September 2004, 23:23   #8
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,555
In FireFox, It looks like this -- with the stream trying to start, but quickly displaying "closed"

I tried to attach a screen capture, but it didn't happen.
djSpinnerCee is offline   Reply With Quote
Old 17th September 2004, 23:26   #9
101
Major Dude
 
101's Avatar
 
Join Date: Jul 2004
Location: Argentina
Posts: 828
Send a message via ICQ to 101
Works ok for me on WMP9/IE6, btw... It's my life, excellent song

Words are very unnecessary, they can only do harm, so enjoy the silence - Depeche Mode
Firemonger Project: Help spread Firefox
101 is offline   Reply With Quote
Old 18th September 2004, 07:37   #10
Ken Rayner
Junior Member
 
Join Date: Sep 2004
Location: Wiltshire, England
Posts: 9
Thanks guys, that pretty much shows where I am with this - it works someplaces, it don't work others!

Even on two (almost) identical PCs, both running XP Professional with WMP for XP version 8.00.00.4487 - one works, but the other doesn't.

I guess this is probably a question for some Microsoft forum really, but thanks for your help.
Ken Rayner is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump