|
|
|
|
#1 |
|
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. |
|
|
|
|
|
#2 |
|
Forum King
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 |
|
|
|
|
|
#3 |
|
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.
|
|
|
|
|
|
#4 |
|
Forum King
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: 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 |
|
|
|
|
|
#5 |
|
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.
|
|
|
|
|
|
#6 |
|
Forum King
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 |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Sep 2004
Location: Wiltshire, England
Posts: 9
|
|
|
|
|
|
|
#8 |
|
Forum King
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. |
|
|
|
|
|
#9 |
|
Major Dude
|
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 |
|
|
|
|
|
#10 |
|
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. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|