0
votes

I have a problem with playing a video on my website using the video tag. I have included different types of video .ogv and .mp4 , and still my video won't run. I tried it on my localhost the videos are working perfectly but when trying online only the controls appear in gray color.

This is a link to the videos page: http://www.raymondyazbeck.com/videos.php?catId=2

This is my code:

<video width="900" height="506" controls autoplay="autoplay" loop="loop" tabindex="0">
   <source src="videos/<?php echo $book[0]['videoName'] ?>.mp4" type="video/mp4">
   <source src="videos/<?php echo $book[0]['videoName'] ?>.ogv" type="video/ogg">
   Your browser does not support the video tag.
</video>
1

1 Answers

2
votes

From investigating your website, I noticed the following problems:

404 Errors

This is a 404 error reported by the console. You need to upload your video files to your server in a location that can be found by the HTTP requests that you're making with those video tags.

In the future, you can use Chrome's Developer Tools or Mozilla's Firebug Extension to see front-end console errors (such as Javascript or load problems.)