How to embed video and get Windows Media Player to STOP!

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
lindarw
New Cone
New Cone
Posts: 5
Joined: 07 Jun 2009 05:38

How to embed video and get Windows Media Player to STOP!

Postby lindarw » 07 Jun 2009 06:12

I am a novice at this...

Here's my problem: I am working in a website builder program, when I use the VLAN suggested HTML code to embed a video, the target= command refers to the site where the video will be opened, since the video is not yet there as I have not transferred it yet nothing happens, I feel I should be using the src= command. When I do this the windows media player defaults and since only the audio will play (I don't have a video decoder installed), I can hear it so I know it is accessing it. How do I get the windows media player to not override when I am putting in this relative path?

See below:

<html>

<head><title>Mom and Dad in Korea</title></head>

<body>
<h1>Mom and Dad in Korea</h1>
<embed type="application/x-vlc-plugin"
name="MomandDadatHomeinKorea"
autoplay="no" loop="yes" width="200" height="200"
src="C:\Documents and Settings\***\My Documents\My Videos\MomandDadatHomeinKorea.mpg" />
<br />
<a href="javascript:;" onclick='document. MomandDadatHomeinKorea.play()'>Play </a>
<a href="javascript:;" onclick='document. MomandDadatHomeinKorea.pause()'>Pause </a>
<a href="javascript:;" onclick='document. MomandDadatHomeinKorea.stop()'>Stop video1</a>
<a href="javascript:;" onclick='document. MomandDadatHomeinKorea.fullscreen()'>Fullscreen</a>
</body>
</html>


Any help will be appreciated...

(I have already set the file to open with VLC, and I have also gone to explorere and set VLC as the preferred program for .mpg files) :?

Mika56
Blank Cone
Blank Cone
Posts: 12
Joined: 07 Jun 2009 23:05

Re: How to embed video and get Windows Media Player to STOP!

Postby Mika56 » 07 Jun 2009 23:16

I'm not sure, but :
Set an id to your embed (such as id="MomandDatatHomeinKorea"), then, set your a such as :

Code: Select all

<a href="#" onclick="document.getElementById('MomandDatatHomeinKorea'.play();">Play</a>
Mika.

lindarw
New Cone
New Cone
Posts: 5
Joined: 07 Jun 2009 05:38

Re: How to embed video and get Windows Media Player to STOP!

Postby lindarw » 08 Jun 2009 03:23

Thanx Mika,

I actually got the video to play in VLC by going through firefox and disabling windows media player so that the default was VLC....

I also think the web site program I was using defaulted to wmp, but I used the classid and codebase for VLC and that worked.


Thanx for your info

lindarw


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 11 guests