longmatch
asked on
How to embed a video in my web page
I would like to embed a video file in my html page. The scenario is I have a student test page, I want a movie to be shown on this page. When students click PLAY button or link, the movie start. If the movie can be shown within the same page as my test page (embedded in the same window), that will be perfect.
Thanks everybody's effort
Longmatch
Thanks everybody's effort
Longmatch
The tags will depend a little on what the format of the video is (streaming or not and whether you want to embed the player). You can find some sample embed coding at http://www.streamalot.com/embed.shtml. There's also a simple (and funny) tutorial at http://www.htmlgoodies.com/tutors/videoembed.html.
<EMBED SRC=filename.avi AUTOSTART=true>
should embed the movie directly into the page you want and have it start playing
what file format is the video?
should embed the movie directly into the page you want and have it start playing
what file format is the video?
ASKER
My video is mpg format, I do not want it to play automatically. I want the video to play after user's click.
thanks
LM
thanks
LM
<EMBED SRC=filename.mpg AUTOSTART=false>
ASKER
When I change AUTOSTART=false, I have no way to make it play. There is no button for me to click. Can we control the movie using some clent side coding?
Use the same format as Richoo said above, just change the src and autostart options.
<embed src="filename.mpg" autostart="false">
<embed src="filename.mpg" autostart="false">
maybe try adding <embed src="filename.mpg" controller="true" autostart="false">
or CONTROLS=playbutton
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
not tested but may work
<embed id="mov" src='filename.mpg' autostart='false'></embed>
<form>
<input type="button" value="Play Movie" onclick="document.getEleme ntById('mo v').setAtt ribute('au tostart',t rue);">
</form>
<embed id="mov" src='filename.mpg' autostart='false'></embed>
<form>
<input type="button" value="Play Movie" onclick="document.getEleme
</form>