View Full Version : Keeping focus on popup embedded WMP

12-28-2008, 06:09 PM
Hello all,

Can't figure this one out.

I have javascript calling a 'show_video.html" page, which using js pops up an embedded wmp player, with selected controls, and runs a short wmv file as part of a 'tour' of a non-profit memorial site.

No problem there, but I can't seem to figure out how the popped up media player window can be set to maintain focus until the user exits the popup, either during or after the wmv file completes. Without this the 320 X 240 will fall behind and stay active.

I've tried adding <body onblur="self.focus();"> to the body of the called 'show_video.html' page, but no joy there. Is there code I can add to the object parameters within the 'show_video.html', hopefully some simple param? This is how it looks now:

<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/ nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="320" height="240">
<param name="fileName" value="station1.wmv">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="playlist.m3u" name="MediaPlayer1" width=320 height=240 autostart=1 showcontrols=1 volume=-300>

Thanks very much,