473,570 Members | 2,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="applicati on/x-oleobject">

<PARAM NAME="URL" VALUE="axrtsp://192.168.1.100/mpeg4/2/media.amp">
<PARAM NAME="SendPlayS tateChangeEvent s" VALUE="True">
<PARAM NAME="AutoStart " VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount " value="9999">
</OBJECT>
<script type="text/javascript">
document.getEle mentById("VIDEO ").play();
//also have tried document.getEle mentById("VIDEO ").controls.pla y();
//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....pla y(). Dan

May 22 '06 #1
2 5199
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="applicati on/x-oleobject">

<PARAM NAME="URL" VALUE="axrtsp://192.168.1.100/mpeg4/2/media.amp">
What protocol is axrtsp: ??
<PARAM NAME="SendPlayS tateChangeEvent s" VALUE="True">
<PARAM NAME="AutoStart " VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount " value="9999">
</OBJECT>
<script type="text/javascript">
document.getEle mentById("VIDEO ").play();
//also have tried document.getEle mentById("VIDEO ").controls.pla y();
//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....pla y().


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.javas cript 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2051
by: Mickel Grönroos | last post by:
Hi! Anybody tried using Windows Media Player 9 via win32com? (And more precisely, combining that with a Tkinter application.) I found a few earlier threads on Windows Media Player and Python, but it seems nobody has really got it to work, e.g. the below does not work: wmp = win32com.client.Dispatch("MediaPlayer.MediaPlayer.1")...
0
1523
by: Bill Eldridge | last post by:
I'm trying to make Windows Media Player visible and control it from Python. It seems when I call it below, I get only the console version, and there's no Visible method like with Internet Explorer. I do catch events, but I need it visible. Should it be put into a panel instead? Should a different type dispatch be called or a different...
1
8901
by: Anise | last post by:
I have a question concerning embedding a windows media player into a web application in .net.. I download Windows Media Player 10 and its SDK On the .ascx page I placed a windows media player object from the toolbox and all the sites i read say when "Adding the Windows Media Player control from the Toolbox also adds references to two...
1
7875
by: Stephen Adam | last post by:
Hi there, Have spent a while trying to find out how to connect to Windows Media Player through COM. Unfortunately there doesnt seem to be much stuff about it on the web. What I need to do is create a simple console application which will be able to find out what the values of a currently playing tack. I've downloaded the Windows Media...
4
7823
by: BobAchgill | last post by:
What is the best way to show a video file directly in a Form? Can I use functions of Windows Player in a Windows Form? Functions like: play video or show visualization for music, etc.
3
5178
by: UJ | last post by:
I have a .avi file that uses the Divx codec. If I load it with windows media player program it works fine. If I load it using my control in a program, it doesn't display. Over standard media files work fine so it's this particular file. Do I have to do anything when the file uses a non-included codec? How can I tell what Codec it's using? ...
5
4560
by: Paul Fi | last post by:
I have this code which tries to obtain the number of items in the current playlist of windows media player: private void MainForm_Load(object sender, System.EventArgs e) { // get Window handle wnd = Win32.FindWindow("WMPlayerApp","Windows Media Player"); wnd = Win32.FindWindowEx(wnd, 0, "WMPAppHost", null); wnd = Win32.FindWindowEx(wnd,...
1
5526
by: sri2097 | last post by:
Basically, I want to check if a URL is playable or not (without actually playing it). i.e. given a URL I want to write an automation script to figure it out for me if it's playable or not. If you give a bad/invalid URL for windows media player to play a pop-up window shows us that it cannot be played. So I would want to catch that event.
0
1887
by: dongarbage | last post by:
Hi there, I've created a user control to put in a web page. I'd like to add a windows media player control to the user control that I've created. But, for some reason, the user control does not load when I add the windows media player control to it. Is the issue that I did not specify the HTML correctly? I have embedded a windows media...
0
2656
by: artsohc | last post by:
Hey Everyone, this is my first time posting so go easy on me. I am trying to hook up music-on-hold at the office I work at. I got all the music loaded and I got Windows Media Player working while the phones are on hold, but now I am trying to write a script that will allow Windows Media Player to run as a service so I can make it auto-start with...
0
7724
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7633
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7944
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7699
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5523
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5247
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3681
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.