Listener for <object>
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   GOC
Posted On:   Friday, July 26, 2013 01:28 PM

        Before I include any code I thought it would be better describe what I an wanting to do. There are streaming video streaming from a url that are part of an <object> tag. I want a new window to popup when the video ends. Below is the object tag and my feeble attempt at adding the listener. <div id="test"> <OBJECT ID="MediaPlayer" WIDTH="514" HEIGHT="416" CLASSID="CLSID:6BF552-394A-11d3-B153-00C04F79FAA6" TYPE="application/x-oleobject"> <PARAM NAME="URL" VALUE="http://url.com/video/Ashland.wvx"> <PARAM NAME="AUTOSTART"    More>>

 

 

 

 

Before I include any code I thought it would be better describe what I an wanting to do.

There are streaming video streaming from a url that are part of an <object> tag.

I want a new window to popup when the video ends.

Below is the object tag and my feeble attempt at adding the listener.

<div id="test">
<OBJECT ID="MediaPlayer" WIDTH="514" HEIGHT="416" CLASSID="CLSID:6BF552-394A-11d3-B153-00C04F79FAA6" TYPE="application/x-oleobject">
<PARAM NAME="URL" VALUE="http://url.com/video/Ashland.wvx">
<PARAM NAME="AUTOSTART" VALUE="False">
<PARAM NAME="UIMODE" VALUE="Full">
<PARAM NAME="FULLSCREEN" value="False">
<PARAM NAME="ENABLECONTEXTMENU " value="False">
<PARAM NAME="STRETCHTOFIT " value="False">
<EMBED TYPE="application/x-mplayer2"
SRC="http://url.com/video/Ashland.wvx"
WIDTH="514"
HEIGHT="416"
AUTOSTART="False"
SHOWCONTROLS="True"
ENABLECONTEXTMENU="False"
STRETCHTOFIT="False">
</EMBED>

</OBJECT>

<script type="text/javascript">
document.getElementByID('test').addEventListener('ended',doStuff);
function doStuff(){
alert("what now?")}</script></div>


GOC
   <<Less
About | Sitemap | Contact