PDA

View Full Version : website HELP-vid on it


sk8brdan
07-23-2002, 12:55 AM
Is there an HTML code that you can insert into a webpage that will let you click on the button and then the video pops up and you can watch it like and avi. or mpg. file way, or just have the video on the site than push play and then you can watch it????:rolleyes:

x_goose_x
07-23-2002, 02:35 AM
If you want a pop-up:

<html>
<head>
<script>

file = "file.mpg";
w = 240;
h = 176;

if (w<=286) { w = 286; }
h2 = (h+127);
vars = "width="+w+", height="+h2+", toolbar=0,location=0,directories=0,status=0,scrollbars=0,menubar=1,resizable=0";

function wmppop() {
pophtml='<div style="position: absolute; left: 0; top: 0;"><OBJECT ID="mplayer" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" TYPE="application/x-oleobject">'+
'<param name="FileName" VALUE="'+file+'" valuetype="ref" ref>'+
'<param name="transparentatStart" VALUE="-1">'+
'<param name="autoStart" VALUE="-1">'+
'<param name="showControls" VALUE="-1">'+
'<param name="AudioStream" value="-1">'+
'<param name="AutoSize" value="-1">'+
'<param name="AnimationAtStart" value="-1">'+
'<param name="AllowScan" value="-1">'+
'<param name="AllowChangeDisplaySize" value="-1">'+
'<param name="BufferingTime" value="5">'+
'<param name="CaptioningID" value>'+
'<param name="ClickToPlay" value="-1">'+
'<param name="CurrentPosition" value="-1">'+
'<param name="DisplayForeColor" value="16777215">'+
'<param name="Enabled" value="-1">'+
'<param name="EnableContextMenu" value="-1">'+
'<param name="EnablePositionControls" value="-1">'+
'<param name="EnableTracker" value="-1">'+
'<param name="InvokeURLs" value="-1">'+
'<param name="Language" value="-1">'+
'<param name="PlayCount" value="1">'+
'<param name="Rate" value="1">'+
'<param name="SelectionStart" value="-1">'+
'<param name="SelectionEnd" value="-1">'+
'<param name="SendOpenStateChangeEvents" value="-1">'+
'<param name="SendWarningEvents" value="-1">'+
'<param name="SendErrorEvents" value="-1">'+
'<param name="SendPlayStateChangeEvents" value="-1">'+
'<param name="ShowAudioControls" value="-1">'+
'<param name="ShowDisplay" value="1">'+
'<param name="ShowPositionControls" value="-1">'+
'<param name="ShowStatusBar" value="-1">'+
'<param name="ShowTracker" value="-1">'+
'</OBJECT></div>'
popupwin=window.open("","WindowsMediaPlayer",vars);
popupwin.document.write(pophtml);
}
</script>
</head>
<body>
<a href="javascript: wmppop();">Launch</a><br><br><br>
</body>
</html>

To embed with your controls:

<OBJECT ID="mplayer" WIDTH=160 HEIGHT=240
CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="c:\file.mpg">
<PARAM NAME="AutoStart" VALUE="False">
</OBJECT>

<br><br>

<a href="#" onclick="document.getElementById('mplayer').stop();">stop</a>
<a href="#" onclick="document.getElementById('mplayer').pause();">pause</a>
<a href="#" onclick="document.getElementById('mplayer').play();">play</a>

If you want to read if it's playing

document.getElementById('mplayer').playstate

0 stop
1 pause
2 play

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/WMP_CE_UsingTheControl.asp

HalloweenFreak
07-23-2002, 02:40 AM
Holy Crapoly! Thanks! :thumbsup:

sk8brdan
07-23-2002, 03:23 AM
THANKS ALOT!!!!!!!!!!!!! THANKS ALOT!!!!!!!!!!!!!:D

sk8brdan
07-23-2002, 03:29 AM
Is there another way to put a video (pop-up or anything) from .wmv or .avi ??????? :cool: