Forum Moderators: not2easy
I don't want to use <param name="autostart" value="1"> to start it, and what I need is not only to play it, but to control on it. And I don't want to use the default controller of this activeX, I want to control it by programe in javascript,
But very sorry to say that I can't find the docs of the method provided by the activeX just like realplayer's [service.real.com...] Is there anybody konw where can I get the docs of mpg ActiveX or plug-in?
Thanks!
<OBJECT ID="MediaPlayer1" width=160 height=162 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"><PARAM NAME="FileName" VALUE="[[link to your video]]]">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
<EMBED type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/" SRC="="[[link to your video]]]" name="MediaPlayer1" width=160 height=162 AutoStart=true>
</EMBED>
</OBJECT>
parameters are:
<param name="AutoStart" value="0">
This command is vital because it decides if the video starts playing automatically or not. If you have lots of clips on the same page then you will need this option, otherwise everything will play at the same time. Just set the value to zero and the video will only play when the visitor clicks on it.
<param name="AutoRewind" value="0">
This tells the video to start from the begining once its done. Its not a loop to replay the video it only resets it.
<param name="ShowStatusBar" value="0">
This makes the little black bar we see at the bottom of media player, showing the play length, and so on.
<param name="ShowTracker" value="1">
This is the media player slider bar. With most audio files you can move to parts of the song but this doesn't work too well with video files. 0 means turn the slider bar (tracker bar) off, and 1 turns the trackerbar on.
<param name="AutoSize" value="0">
If this value is set to 1 then the video will automatically resize to the original size of the WMV file and not what you define.
<param name="AnimationAtStart" value="0">
If this is set to 1 it will show the media player logo before the video plays. It doesn't look very proffesional to me so I always turn the baby off by setting value 0.
<param name="TransparentAtStart" value="0">
Normally media player will give a black background before the video starts. If you set this to value 1 then it will start with the same colour as the webpage.
<param name="ClickToPlay" value="1">
This gives the option for the user to click on the video screen to start it playing. This is useful if you don't want any play buttons stuck at the bottom of the video. The visitor can just click on the video and it will play.
<param name="ShowAudioControls" value="1">
Shows the volume control or not.
<param name="ShowDisplay" value="0">
Shows the author details i.e. made by blokie etc.
Suppose there is only one clip of video, and serval checkboxes which means a part of the video to play when a user checked one of these checkboxes. So, it must programed for each checkbox correctly. Then what I need is the method such as which can ask the player to stop, play, pause, mute or move to one position of the clip. That's what I want!
I only know how to programe in realplayer AcitveX. For example a player named 'player'. Then I can write
<script language=Javascript>
function stop()
{
player.doStop();
}
function playAt(pos)
{
if (player.canPause()) player.doPause();
player.setPosition(pos);
player.doPlay();
}
</script>
then the two function above will ask player to stop or go to the position of pos and begin to play.
I wander where can I find the docs for such function can be used for windows media player's ActiveX!
Thanks for your explanations! You are warmhearted!
[webreference.com...]
[msdn.microsoft.com...]
Thanks for your help! Have a nice day!