469,358 Members | 1,632 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Scripting Windows Media Player

Dan
I have the following code:
<html>
<body>
<OBJECT id="VIDEO" width="320" height="240"
style="position:absolute; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">

<PARAM NAME="URL" VALUE="axrtsp://192.168.1.100/mpeg4/2/media.amp">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>
<script type="text/javascript">
document.getElementById("VIDEO").play();
//also have tried document.getElementById("VIDEO").controls.play();
//also document.VIDEO.play()
</script>
</body>
</html>

The trouble is the video does not play unless I right click on it in IE
and select play from there. I am using Win Media Player 9 and IE6. This
is a live MPEG4 stream, I don't know if it has anything to do with the
trouble or not. The point is why does, a right click / play menu
selection work and not a document....play(). Dan

May 22 '06 #1
2 5068
Dan said the following on 5/22/2006 4:59 PM:
I have the following code:
<html>
<body>
<OBJECT id="VIDEO" width="320" height="240"
style="position:absolute; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">

<PARAM NAME="URL" VALUE="axrtsp://192.168.1.100/mpeg4/2/media.amp">
What protocol is axrtsp: ??
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>
<script type="text/javascript">
document.getElementById("VIDEO").play();
//also have tried document.getElementById("VIDEO").controls.play();
//also document.VIDEO.play()
</script>
</body>
</html>

The trouble is the video does not play unless I right click on it in IE
and select play from there.
You should be able to click twice with the left mouse button and get it
to play.
I am using Win Media Player 9 and IE6. This is a live MPEG4 stream,
I don't know if it has anything to do with the trouble or not.
The trouble is MS and EOLAS.
The point is why does, a right click / play menu
selection work and not a document....play().


Because script can't instantiate an ActiveX object anymore that is hard
coded into the page or dynamically created within the page. If it is
created using document.write from an external file, then it becomes
instantiated and you can script it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 23 '06 #2
Dan
>What protocol is axrtsp: ??
I think it is a custom rtsp protocol for my axis video camera server
that I am accessing. I just put what the example showed for the server.
Because script can't instantiate an ActiveX object anymore that is hard
coded into the page or dynamically created within the page. If it is
created using document.write from an external file, then it becomes
instantiated and you can script it.

Im not sure what your getting at, I am a recent user of Javascript.
How do I accomplish what you suggest?

May 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mickel Grönroos | last post: by
reply views Thread by Bill Eldridge | last post: by
4 posts views Thread by BobAchgill | last post: by
3 posts views Thread by UJ | last post: by
1 post views Thread by sri2097 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.