Hello, I'm going to purchase a video from istockphoto ( http://www.istockphoto.com/stock-video-5661255-blue-light-loopable-server.php ) the formats available are .mov .mp4 or .mwv When a visitor goes to the website, I want the video to automatically start playing and loop. I don't want any controls to play or pause, etc. What format would be best to do this and how would I go about doing this? the website is css based Thanks in advance!
try this code <script type='text/javascript' src='swfobject.js'></script> <div id='mediaspace'>This text will be replaced</div> <script type='text/javascript'> var so = new SWFObject('player.swf','mpl','470','320','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('file','http://yourfilelink.com/filename.ext'); so.addVariable('title','Title for the video'); so.addVariable('controlbar','none'); so.addVariable('autostart','true'); so.addVariable('repeat','always'); so.write('mediaspace'); </script>
or use this one for WMV format <script type='text/javascript' src='silverlight.js'></script> <script type='text/javascript' src='wmvplayer.js'></script> <div id='container'></div> <script type='text/javascript'> var cnt = document.getElementById('container'); var src = '/jw/embed/wmvplayer.xaml'; var cfg = {height:'250',width:'470',duration:'Time for Video',file:'filename,ext',shownavigation:'false',autostart:'true',repeat:'true',usefullscreen:'false'}; var ply = new jeroenwijering.Player(cnt,src,cfg); </script>
FLV is the best format. It is also OK if your mov and mp4 file is H.264 codec. You can also check this tutorial about how to make online video automatically start to play - http://flash-video-player.blogspot.com/2009/03/how-to-make-video-auto-play-on-web-page.html