PDA

View Full Version : Javascript causes a pause?



Olii
04-04-2006, 02:40 PM
Hi.

I'm using the 'Auto resize iFrame' script for my new websites layout. My website is based around a radio, and the script I'm using causes the radio to pause whenever you click a link on the navigation, which targets the iFrame.

Not to long ago I also noticed that this also happens using pop-ups. For instance, if you click to open a popup, it will pause the radio.

My radio is playing in a simple windows media player object, using the code as follows:


<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="player" width="205" height="43" standby="Loading" CODEBASE="../CODEBASE=http:/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715">
<param name="url" value="v3/images/players/windowsmediaplayerlinkfile.asx">
<param name="autostart" value="-1">
<param name="uimode" value="mini">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="100">
<param name="mute" value="0">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
<embed src="v3/images/players/windowsmediaplayerlinkfile.asx" width="205" height="43" autostart="true" controls="playbutton" showstatusbar="false" url="http://www.bobblefm.co.uk/bobblefm.asx" autoplay="true" uimode="mini"></object>

I think this might be a problem that any JavaScript code will cause. Does anyone know how to get around it?

Thanks
Oli

jscheuer1
04-04-2006, 03:13 PM
It may also happen whenever the browser is asked to stream audio and load content at the same time, such as loading a page into a frame or iframe using a normal non-script related targeted link. Check to make sure that is not the problem. If that is the problem, it has nothing to do with javascript. I know little about the Media Player but, if you could force it to add additional buffering, it might help.

Olii
04-04-2006, 04:31 PM
At first, I believed that you where right. But I no longer believe that is the reason, as when I use normal iFrames it works perfectly and the radio doesn't get interupted whatsoever.