2013-01-22 11 views
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>   

답변

0

JW Player를 사용하신 것 같습니다. 맞습니까? 그런 다음 flashvars에 repeat: none을 추가해야합니다. 그러면 다음과 같이 보입니다. 에

var flashvars = { 
     src: "demo.flv", 
     repeat: "none" 
}; 

더 자세한 사항 '을 FlashVars'PARAMS over here. 나는 반복 추가 한

+0

: "없음"내 코드를하지만, 작동하지 않았다. – Ranjit

+0

브라우저를 새로 고침하거나 캐시를 비우십시오. 플래시는 그런 방식으로 매우 영구합니다. – JakeGould

+0

안녕하세요 JakeGouldGo 쿠키를 지웠습니까? – Ranjit