我有一个 HTML5<video>
元素可以在 Chrome 中完美运行,但在 Firefox 和 Opera 中都不能。
这是 HTML 代码:
<div id="tele">
<video id="v" width="254" height="204" autoplay>
<source id="mp4" src="/media/joies.mp4" type="video/mp4" />
<source id="ogg" src="/media/joies.ogv" type="video/ogg" />
<source id="webm" src="/media/joies.webm" type="video/webm" />
<object id="flash" type="application/x-shockwave-flash"
data="player.swf?file=joies.mp4">
<param id="flash2" name="movie" value="player.swf?file=joies.mp4" />
</object> </video>
</div>
<ul>
<li><a href="#" class="activo"
onClick="changeVideo('/media/joies.ogv','/media/joies.mp4','/media/joies.webm','player.swf?file=joies.mp4','player.swf?file=joies.mp4','<?php echo __('Col·leccions. Música de Kaiserama. Compositor Oscar Kaiser.')?>')">1</a>
</li>
<li><a href="#"
onClick="changeVideo('/media/CanalTE.ogv','/media/CanalTE.mp4','/media/CanalTE.webm','player.swf?file=CanalTE.mp4','player.swf?file=CanalTE.mp4','<?php echo __('Joies Corrents. Música de Kaiserama. Compositor Oscar Kaiser')?>')">2</a>
</li>
<li><a href="#"
onClick="changeVideo('/media/FAD.ogv','/media/FAD.mp4','/media/FAD.webm','player.swf?file=FAD.mp4','player.swf?file=FAD.mp4','<?php echo __("Enjoia\'t 06. Orfebres Fad.")?>')">3</a>
</li>
</ul>
和 JavaScript 代码:
function changeVideo(v,x,w,y,z,tit) {
var presentationImg = "presentationImg";
var presentationImg2 = "presentationImg2";
document.getElementById("mp4").src=x;
document.getElementById("ogg").src=v;
document.getElementById("flash").data=y;
document.getElementById("flash2").value=z;
document.getElementById("webm").src=w;
document.getElementById("titol").innerHTML=tit
var video = document.getElementById('v');
video.load();
video.play();
}
访问网站:http ://www.saradomenech.com/ca/zapping 问题出在哪里?
谢谢
问候