Link to home
Start Free TrialLog in
Avatar of designaire
designaireFlag for United States of America

asked on

video html5

I have a few video files and I'm trying to play them using html  5 but they aren't working. Is there any thing that is wrong with this code. Could it be the video files? They run fine on the hard drive but not through the browser.

http://www.designaire.com/pr1/videotest.html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>

<body>
<video width="720" height="406" controls>
  <source src="BarberShop.webm" type='video/webm; codecs="vp8, vorbis"' />
  <source src="BarberShop.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
  <source src="BarberShop.ogg" type='video/ogg; codecs="theora, vorbis"' />
  Video tag not supported. Download the video <a href="movie.webm">here</a>.
</video>


</body>
</html>


I've also tried this...
http://www.designaire.com/pr1/videotest1.html

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>

<body>
<video width="720" height="406" controls>
  <source src="movie.mp4" type="video/mp4" />
  <source src="movie.ogg" type="video/ogg" />
  Video tag not supported. Download the video <a href="movie.webm">here</a>.
</video>


</body>
</html>
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

I've downloaded and played all three versions.  "BarberShop.ogg" has no content.  Firefox will play "BarberShop.webm" but for some reason it is defaulting to 'ogg'.  Safari will play the "BarberShop.mp4" with Quicktime.  Chrome on my Mac uses the "BarberShop.webm" and plays.

But I see you removed that.  I think you removed the wrong one.  Get rid of the 'ogg', it has no content.
Avatar of designaire

ASKER

Thank you for your quick response. What does ie play?
I got roid of the ogg but they still don't play. Any suggestions. could it be the video itself. The code's pretty simple.
Firefox Chrome and Safari will play but the 'ogg' didn't have any content.  IE8 and below don't play anything.  IE9/10 are supposed to play MPEG-4/H.264 .  See here for more details: http://caniuse.com/#feat=video
Chrome is working but not firefox or ie.
Interesting.  It says a MIME or codec problem which it must be because Firefox plays the 'webm' version if I load it directly.

Now your code is all screwed up and I can't check anything.
sorry, I changed the code back. I was trying some other things. They didn't work.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you,

Hosting company...
We have added the MIME types for video files in your .htaccess file. Refer the details pasted at the end of this email.

The video file in the URL 'http://designaire.com/pr1/videotest.html' is loading fine. We have attached a screen shot for your reference.

Please cross check the same from your end and get back to us if you need any further assistance.

Details for your reference
===============
AddType video/ogg .ogv .ogg
AddType video/mp4 .mp4
AddType video/webm .webm
===============
Thank you!
You're welcome!