controlling Windows Media Player

H

Herb

I've found how to use javascript to embed a Windows Media Player in a web
page. How do I go about controlling the player in response to user input?

There should be calls to start, stop and also to play at a certain
position.

For instance, I'd like to have a video playing. Along with that, I'd
present a list of 10 chapters within the video. When a user clicks a link,
the player should play the appropriate chapter or section. Thanks.
 
C

cwdjrxyz


The above url discusses using an ActiveX object only as shown by the
code:

<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="your file or url">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>

The classid is the ActiveX for the WMP. Hence it will not work for
most browers other than IE that do not support ActiveX. You have to
add another path to support non-ActiveX browsers.

The above reference is ancient, coming from 2003. It speaks of a
Netscape 7.1, and we are now up to 8.1.2. It speaks of WMP 9 and we
are now up to 11. It uses browser version detection using javascript,
and the FAQ of this group and frequent post here explain why this no
longer is a good idea. The code uses much unnecessary complexity to
control start, stop, etc when these are already built into the WMP
object which displays them on the WMP control bar if you just show it,
and no script is needed to do so.

See my page at http://www.cwdjr.info/souearly/mixedtestRoot.php
showing how you can embed the WMP on a page for audio without any
ActiveX or script. A closely related method also works for video. The
WMP is about 3 times the size as a lean browser such as Firefox or
Opera, and has many things built in. I see no need to reinvent the
wheel unless doing something that is not built into the WMP is
absolutely required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top