[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-wmtalk
Subject:    Re: Embeded Windows Media player
From:       Lee Atkinson <leeatkinson.lists () GMAIL ! COM>
Date:       2005-06-22 14:37:22
Message-ID: 42b977a8.4a358781.6705.ffff82ba () mx ! gmail ! com
[Download RAW message or body]

Hi Ben

On a Mac, in IE, it will use your 6.4's embed code - which as the source set
to "http://ncnetshow/station1.asx". This may be enough to confuse it, since
what will happen is that, for embeds, it's the browser that downloads the
'src' URL, then passes it to the plugin. I'm speculating, but probably,
because IE can't download this file, it does not init the plugin? Maybe, for
all other browsers that use <embed>, they init the plugin anyway - and the
plugin then uses the 'filename' URL.

I would suggest to check for the existence of ActiveXObject before
instantiating one, rather than just assume that because "Netscape" isn't in
the navigator.appName, then it exists - for instance, ActiveX doesn't exist
for Mac IE. I.E:


if ( window.ActiveXObject ){
     WMP7 = new ActiveXObject('WMPlayer.OCX'); }

Regards

Lee


Lee Atkinson
Makeni Ltd
http://www.makeni.com
 
 

-----Original Message-----
From: WMTalk [mailto:WMTalk@DISCUSS.MICROSOFT.COM] On Behalf Of Ben Brown
Sent: 22 June 2005 15:08
To: WMTalk@DISCUSS.MICROSOFT.COM
Subject: Embeded Windows Media player

I have web pages with Windows Media Player embeded. As most of our 
content is audio, I am trying to hide the video window by changing the 
size of Media player. The code I have works on every flavor of browser 
that I have (IE/Netscape7/Firefox on PC, Firefox/safari on OSX) except 
IE on OSX. We have been pounding this for a couple of days and are out 
of ideas. I have included the code we are using below. Thanks in advance 
for any help.

BEN BROWN
HomegrownBroadcasting

<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="286" 
height="65">');
     document.write ('<PARAM NAME="url" 
VALUE="http://interface.audiovideoweb.com/lnk/ny60win16064/HC/Community/Winc
hesterCityCouncil/WinchesterCityCouncil.wma/play.asx">');
     document.write ('<PARAM NAME="AutoStart" VALUE="true">');
     document.write ('<PARAM NAME="ShowControls" VALUE="1">');
     document.write ('<PARAM NAME="uiMode" VALUE="full">');
     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="286" 
height="65">');
     document.write ('<PARAM NAME="FileName" 
VALUE="http://interface.audiovideoweb.com/lnk/ny60win16064/HC/Community/Winc
hesterCityCouncil/WinchesterCityCouncil.wma/play.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="http://interface.audiovideoweb.com/lnk/ny60win16064/HC/Community/W
inchesterCityCouncil/WinchesterCityCouncil.wma/play.asx"');
     document.write ('        src="http://ncnetshow/station1.asx"');
     document.write ('        Name=MediaPlayer');
     document.write ('        ShowControls=1');
     document.write ('        ShowDisplay=1');
     document.write ('        ShowStatusBar=1');
     document.write ('        width=290');
     document.write ('        height=140>');
     document.write ('    </embed>');

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

</SCRIPT>

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.html
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:WMTalk-signoff-request@DISCUSS.MICROSOFT.COM

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.html
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:WMTalk-signoff-request@DISCUSS.MICROSOFT.COM
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic