473,659 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 13492
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.javas cript 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.contac t" <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="applicati on/x-oleobject">

<PARAM NAME="URL" VALUE="your file or url">
<PARAM NAME="SendPlayS tateChangeEvent s" 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
2065
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") wmp.FileName = "C:/Path/To/Some/Media/File.wav"
1
8911
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 libraries created by Visual
1
7886
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 player SDK which come with some IDL and
4
7831
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
5182
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? TIA - Jeff.
1
5536
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.
4
8012
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. -- Jeffrey Barish
19
19250
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 things a bit easier. What I need to do is create a playlist and play it using JavaScript. I keep on getting close but not close enough to play the dang files. Has anyone done this before and can shed some light on what worked for them?
0
2662
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 out needing a user logged in on the computer. Also it would allow the music-on-hold to work if we...
0
8341
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8539
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.