在HTML 5视频标签上更改源
<video> <source src="video.mp4"></source> <source src="video.ogv"></source> <object data="flowplayer.swf" type="application/x-shockwave-flash"> <param name="movie" value="flowplayer.swf" /> <param name="flashvars" value='config={"clip":"video.mp4"}' /> </object></video>
<source>
<script>function loadAnotherVideo() { var video = document.getElementsByTagName('video')[0]; var sources = video.getElementsByTagName('source'); sources[0].src = 'video2.mp4'; sources[1].src = 'video2.ogv'; video.load();}</script>
<source>
<video>
相关分类