By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

controlling Windows Media Player

P: n/a
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.
May 22 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Herb said the following on 5/22/2007 3:20 PM:
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?
Ummm, make it visible and let the user click the buttons on the WMP.
Simple stuff :) And, nothing to do with Javascript.
There should be calls to start, stop and also to play at a certain
position.
There are. They are buttons that are, by default, on WMP.
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.
Flash.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 23 '07 #2

P: n/a

Herb wrote:
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.
http://www.mioplanet.com/rsc/embed_mediaplayer.htm
http://devedge-temp.mozilla.org/view.../index_en.html

May 23 '07 #3

P: n/a
On May 22, 11:51 pm, "scripts.contact" <scripts.cont...@gmail.com>
wrote:
Herb wrote:
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.
http://www.mioplanet.com/rsc/embed_mediaplayer.htm .
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.
http://devedge-temp.mozilla.org/view.../index_en.html .
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.
May 23 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.