Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a mpeg on my web site

Status
Not open for further replies.

trent101

Programmer
Nov 4, 2005
50
AU
Ok, I want to be able to let the user click a hyperlink and see a window open and automatically play a mpeg.

So far I have got this working using javascript, however there is one problem.

When the window opens it starts playing and about 3 seconds into the clip it starts to jault, I presume this is because all the video is not downloaded yet?

So what I would like is for the video to be downloaded completely before it starts playing. Does anyone have any ideas on how to do this? I will paste my code from the page that displays the video below below, I appreciate any help. Cheers.

<html>
<head>
<script>
function changeScreenSize(w,h)
{
window.resizeTo( w,h )
}
</script>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>MPEG Vid</title>
</head>
<body onload="changeScreenSize(450,580)">
<object id="MediaPlayer1"
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject" height="402" width="400">
<param name="FileName" value="video.mpg"><param
name="animationatStart" value="false"><param
name="transparentatStart" value="true"><param
name="autoStart" value="true"><param
name="showControls" value="true">
<embed type="application/x-mplayer2"
pluginspage=" src="video/artwork.mpg" name="MediaPlayer1"
autostart="true" height="402" width="400"></object>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top