我是新手来运行 .flv 文件。我用了这个教程。教程http://www.fieg.nl/embed-html5-video-with-flash-fallback#file-index.html
的链接此处视频文件不时重复。我认为这是一个循环。打开窗口时视频文件如何运行一次。运行 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>
答案 0 :(得分:0)
看起来你正在使用JW Player,对吗?然后你应该将repeat: none
添加到flashvars中,这样看起来就像这样。
var flashvars = {
src: "demo.flv",
repeat: "none"
};
有关'flashvars'参数的更多详情over here.