Customise media player control with border and progress bar
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Customise media player control with border and progress bar

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web
Author Message
Carl Gilbert
Guest





Posted: Tue Apr 19, 2005 4:30 pm    Post subject: Customise media player control with border and progress bar Reply with quote

Hi

I am looking to put a media player in a HTML page. I am using the following
code to display the media player:

<OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/
controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
STANDBY="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject">

<PARAM NAME="fileName" VALUE="C:\movie.wmv">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">

</OBJECT>

The page currently looks something like this:
http://www.blackwaterbadgers.co.uk/media_player_old.jpg

but I want it to look something like this:
http://www.blackwaterbadgers.co.uk/media_player_new.jpg

I assume I would first hide the controls but does anyone know how to overlay
an image so I could get the rounded border (the image would have a
transparent centre) and how would I approach implementing the progress bar?

Kind regards, Carl Gilbert

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Wed Apr 20, 2005 12:30 am    Post subject: Re: Customise media player control with border and progress Reply with quote

On Tue, 19 Apr 2005 17:13:41 +0100, "Carl Gilbert"
<cnl@newsgroup.nospam> wrote:

Quote:
Hi

<snip />

Use your original object code instead : I have absolutely no idea why
you took working code for media player 7 and above, and converted it
*back* to media player 6.4 which doesn't support the events and
controls you'll need to do this.

Please don't randomly change stuff or you're wasting our time.

Quote:
does anyone know how to overlay an image so I could get the rounded border
(the image would have a transparent centre)

We discussed this 2 days ago and I gave you a complete soluition.

Please don't waste my and others time by re-posting the same question.

Quote:
and how would I approach implementing the progress bar?

I found you a slider control tutorial at google in about 2 minutes :
http://www.phys.uu.nl/~hofman/jsexp/explslider.html like this :
http://www.google.co.uk/search?q=javascript+slider&btnG=Search&hl=en

Please don't waste our time by not doing the most basic of searches
before requesting help.

To answer your question, you need to feed it the ratio of
player.controls.currentPosition to player.currentMedia.duration on
let's say a 1 second setInterval using javascript, once the player has
been started. Trap for divide-by-zero errors.

You can find the complete documentation for windows media player at
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp
under the link "Windows media player SDK".

Cheers - Neil
Back to top
Sebastian Gottschalk
Guest





Posted: Sun Apr 24, 2005 11:40 pm    Post subject: Re: Customise media player control with border and progress Reply with quote

Carl Gilbert wrote:

Quote:
OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/
controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
STANDBY="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject"

PARAM NAME="fileName" VALUE="C:\movie.wmv"
PARAM NAME="animationatStart" VALUE="true"
PARAM NAME="transparentatStart" VALUE="true"
PARAM NAME="autoStart" VALUE="true"
PARAM NAME="showControls" VALUE="true"

/OBJECT

That doesn't work, as the "data" attribute is missing, the "classid" is
invalid and the such attributes like "codebase" and "standby" don't exist.
The param stuff is invalid, too. Can't you read the HTML specification? Try
it the correct way:

| <OBJECT ID="mediaPlayer"
| CLASSID="Wmplayer.Wmplayer"
| TYPE="application/x-oleobject"
| DATA="C:\movie.wmv">
| If you can read me, then the plugin is missing.
| </OBJECT>
--
Dieser Schrieb stellt eine private Meinungsäußerung des Verfassers im
Sinne der gesetzlich garantierten Meinungsfreiheit dar. Wem das nicht
passt, der wende sich an das Bundesverfassungsgericht. Viel Erfolg!
Key: 0xA0E28D18 FP: 83AE 1136 1E2B 9767 8FB2 7594 4128 1A9E A0E2 8D18

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Mon Apr 25, 2005 4:30 pm    Post subject: Re: Customise media player control with border and progress Reply with quote

On Sun, 24 Apr 2005 20:40:13 +0200, Sebastian Gottschalk
<seppi@seppig.de> wrote:


Quote:
The param stuff is invalid, too. Can't you read the HTML specification?

Param stuff is perfectly valid : Ref W3C XHTML documentation
http://www.w3.org/TR/2004/WD-xhtml2-20040722/mod-object.html

Quote:
Try it the correct way:
| <OBJECT ID="mediaPlayer"
| CLASSID="Wmplayer.Wmplayer"
| TYPE="application/x-oleobject"
| DATA="C:\movie.wmv"
| If you can read me, then the plugin is missing.
| </OBJECT

Really ? If this is correct, can you name a browser that it works in ?

I tried it in these browsers and saw the "plugin missing" default text
for the object :

IE6.0.2800
Netscape 4.73
Netscape 7.02
Opera 4.12
Opera 6.01
Opera 8.0
Firefox 1.03

And so if none of those "worked", how is the code "correct" ?

Cheers - Neil
Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB