0
我是新来运行一个.flv文件。我为此使用了一个教程。本教程的链接http://www.fieg.nl/embed-html5-video-with-flash-fallback#file-index.html要运行一个没有循环的flv文件
这里的视频文件正在重复时常。我认为这是一个循环。视频文件在打开窗口时如何运行一次。下面是运行flv文件的代码。
<script type="text/javascript">
jQuery(document).ready(function() {
var v = document.createElement("video"); // Check if the browser supports the video tag
if (!v.play) { // If no, use Flash.
var params = {
allowfullscreen: "false",
allowscriptaccess: "always",
wmode: "transparent"
};
var flashvars = {
src: "demo.flv"
};
swfobject.embedSWF("http://localhost/TantraProjects/Ranjit/html5/demo_flv.SWF", "demo-video-flash", "270", "296", "9.0.0", "http://localhost/TantraProjects/Ranjit/html5/expressInstall.swf", flashvars, params);
}
else {
// fix for firefox not looping
var myVideo = document.getElementById('demo-video');
if ((typeof myVideo.loop == 'boolean')) { // loop supported
myVideo.addEventListener('ended', function() {
this.currentTime = 0;
this.play();
}, false);
}
}
});
</script>
请帮助我更多地了解它。
嗨,我对视频有同样的看法。视频中有一个循环,我不想循环播放视频。我的代码为html。
<div id="demo-video-flash"><!-- wrapped in a div for the flash fallback -->
<video id="demo-video" height="155" width="270" autoplay loop>
<source src="http://localhost/TantraProjects/Ranjit/html5/demo.mp4" type="video/mp4" /> <!-- MPEG4 for Safari -->
<source src="http://localhost/TantraProjects/Ranjit/html5/demo.ogv" type="video/ogg" /> <!-- Ogg Theora for Firefox 3.1b2 -->
<!-- this is the image fallback in case flash is not support either -->
<img src="http://localhost/TantraProjects/Ranjit/html5/demoo.png"/>
</video>
</div>
我已经加入了重复:“无”到我的代码,但没有奏效。 – Ranjit
尝试重新加载浏览器或清除缓存。 Flash非常坚持这种方式。 – JakeGould
嗨JakeGould我清理了我的cookie,但仍然收到了循环 – Ranjit