Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The html5 video shows at local but not online

this is the first time I'm trying to use html5 to display a video. I could view the video on my local machine and wamp, no problem with the code.

However today I loaded the video page online to one of my subdomains eg abc.mysite.com The video is simply disappeared. I went to check firebugs, the source part of the code is greyed out.

Can someone please lead me to the right direction to make this video work online? Is there anything in cpanel or something I need to configure to make html5 online? Thanks very much.

Here is the code

<div id="item1" class="item">   
<div class="content">
   <a href="#item2" class="panel">
      <video id="my_Video" width="100%" height="100%" preload="auto" autoplay loop>

            //below is where greyed out on firebugs!!

             <source src="_video/abc12296_Animation.mp4" type="video/mp4" />
             <source src="_video/abc12296_Animation.webm" type="video/webm" />
             <source src="_video/abc12296_Animation.ogv" type="video/ogg" />
             <p>Your browser does not support HTML5 video.</p>

           //finished grey out!

          </video>  
   </a> 
 </div>
 </div>

  <script>
  $("#my_Video").bind("ended", function(){
    this.play();
  });
  </script> 
like image 271
grumpypanda Avatar asked Dec 19 '25 18:12

grumpypanda


1 Answers

had a similiar issue, and i had to register the mime types via .htaccess on my server (mp4 didn t work before).

.htaccess-file:

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

check here: http://blog.j6consultants.com.au/2011/01/10/cross-browser-html5-video-running-under-iis-7-5/

like image 108
longi Avatar answered Dec 22 '25 10:12

longi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!