HTML5的视频插入,兼容各个浏览器

<video controls="controls"  autoplay="autoplay" poster="xpg.jpg" title="640">

    <source src="xpg.m4v" type="video/mp4" />//Safar3+,Chrome5-,IE9+,ios,android2+ 
    
    <source src="xpg.webm" type="video/webm" />//firefox4+,Chrome6+,opera11+,IE9+,android2.3+
    
    <source src="xpg.ogv" type="video/ogg" />//firefox3.5+,chrome5+,opera10,5+
    <object type="application/x-shockwave-flash" width="640" height="360" style="position:relative;">
			<param name="movie" value="flashfox.swf" />
			<param name="allowFullScreen" value="true" />
			<param name="flashVars" value="autoplay=true&amp;controls=true&amp;fullScreenEnabled=true&amp;posterOnEnd=true&amp;loop=false&amp;poster=xpg.jpg&amp;src=xpg.m4v" />
			<embed src="flashfox.swf" width="640" height="360" style="position:relative;"  flashVars="autoplay=true&amp;controls=true&amp;fullScreenEnabled=true&amp;posterOnEnd=true&amp;loop=false&amp;poster=xpg.jpg&amp;src=xpg.m4v"	allowFullScreen="true" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_en" />
		</object>
	</video>

object标记针对不支持video标记的浏览器

video需要三个视频文件分别是MP4(xpg.m4v),webm(xpg.webm),ogg(xpg.ogv)

你可能感兴趣的:(html5,浏览器,video)