Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

controlling Windows Media Player


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.

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/

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/viewsource/2003/windows-media-in-nets...
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.

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.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc