2013-07-08 3 views
0
내가 비디오를 구현에는 Video.js을 사용하고

에로드하고 다음과 같은 코드가 아닙니다 :HTML5 비디오는 크롬

htaccess로 :

AddType text/x-component .htc 

AddType video/mp4 .mp4 .m4v 
AddType video/webm .webm 
AddType video/ogg .ogv .ogg 

HTML :

<video id="video-1" class="video-js vjs-default-skin" 
          width="100%" height="100%" 
           poster="videos/timelapse.jpg" 
          data-setup='{ "controls": true, "autoplay": false, "preload": "auto" }'> 
         <source src="videos/timelapse.mp4" type='video/mp4' /> 
         <source src="videos/timelapse.webm" type='video/webm' /> 
         <source src="videos/timelapse.ogv" type='video/ogg' /> 
          Your browser doesn't support HTML5 video. 
         <a href="videos/timelapse.mp4">Download</a> the video instead. 
         </video> 

내가 얻을 크롬 오류 다음 오류 :

["Video Error", Object] 
0: "Video Error" 
1: Object 
length: 2 
__proto__: Array[0] 

그러나 내가 형식의 순서를 바꾸고 .webm을 먼저 넣으면 크롬에서는 작동하지만 파이어 폭스에서는 작동하지 않습니다.

아이디어가 있으십니까? 감사!

답변

0

mp4 및 ogg를 사용하면 충분하며 ie9 +, opera 10.6+, chrome 6+, firefox 3.6+ 및 safari 5+에서 작동해야합니다.

<source src="videos/timelapse.mp4" type="video/mp4"> 
<source src="videos/timelapse.ogg" type="video/ogg"> 
+0

아니요 Google 크롬에서는 작동하지 않지만 오류는 발생하지 않지만로드 중입니다. gif – user1937021

관련 문제