473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.
May 22 '07 #1
3 13473
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

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

Similar topics

0
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,...
1
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...
1
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...
4
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
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...
1
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...
4
by: Jeffrey Barish | last post by:
Is there a way to interact with Windows Media Player from Python? I would like to be able to do things like tell WMP to play a given sound file or to ask WMP for metadata about a sound file. --...
19
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.