When a video won’t play and the video file doesn’t have valid extension, you may need to tell swfobject this is a video file.
provider=video
<html> <head> <title>Video Test</title> <script type='text/javascript' src='swfobject.js'></script> </head> <body> <!--div id="daVideo"> <P>Alternate Text</P> </div--> <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='640' height='360' id='player1' name='player1'> <param name='movie' value='player.swf'> <param name='allowfullscreen' value='true'> <param name='allowscriptaccess' value='always'> <param name='flashvars' value='file=http://HOST/filename&image=http://HOST/imagename&provider=video&autostart=true'> <embed id='player1' name='player1' src='player.swf' width='640' height='360' allowscriptaccess='always' allowfullscreen='true' flashvars="file=http://HOST/filename&image=http://HOST/filename&provider=video&autostart=true" /> </object> <!--script type="text/javascript" > /* // Baseline: var poster = "http://HOST/filename"; var video = "http://HOST/filename"; var player = "http://HOST/video/player.swf"; if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) document.getElementById("daVideo").innerHTML = '<video width="640" height="360" poster="'+poster+'" src="'+video+'" controls />'; else { var so = new SWFObject(player,'mpl','640','360','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('file', video); so.addVariable('image', poster); so.addVariable('provider','video'); so.write('daVideo'); } */ </script--> </body> </html>
Comments are closed.