I have built a simple JukeBox for the CF_Nuke Portal that embeds MediaPlayer
and plays files from directories on your site.


Here is the script that embeds the Mediaplayer does anyone know how I can
reload the page when a song ends?

var WMP7;


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


if ( WMP7 )
{
     document.write ('<OBJECT ID=MediaPlayer ');
     document.write (' CLASSID="">      document.write (' standby="Loading Microsoft Windows Media Player
components..."');
     document.write (' TYPE="application/x-oleobject" width="140"
height="40">');
     document.write ('<PARAM NAME="url"
VALUE="<cfoutput>#URL_Path#</cfoutput>"');
     document.write ('<PARAM NAME="AutoStart" VALUE="true">');
     document.write ('<PARAM NAME="ShowControls" VALUE="1">');
     document.write ('<PARAM NAME="uiMode" VALUE="mini">');
     document.write ('</OBJECT>');
}


else
{
     //IE Code
     document.write ('<OBJECT ID=MediaPlayer ');
     document.write ('CLASSID="" ');
     document.write
('CODEBASE=""> .cab#Version=6,4,5,715 ');
     document.write ('standby="Loading Microsoft Windows Media Player
components..." ');
     document.write ('TYPE="application/x-oleobject" width="140"
height="40">');
     document.write ('<PARAM NAME="FileName"
VALUE="<cfoutput>#URL_Path#</cfoutput>"');
     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="<cfoutput>#URL_Path#</cfoutput>"');
     document.write ('        src="">      document.write ('        Name=MediaPlayer');
     document.write ('        ShowControls=1');
     document.write ('        ShowDisplay=0');
     document.write ('        ShowStatusBar=1');
     document.write ('        width=290');
     document.write ('        height=40>');
     document.write ('    </embed>');


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

Rick Eidson
Partner & CTO
ArcRiver Technology, LLC
ASP, PHP, PERL, Cold Fusion Hosting Kansas City
http://www.arcriver.com/ <http://www.arcriver.com/>


Kansas City Musicians
http://www.kcjukebox.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to