This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTML5 video tag won't work no matter what browser I use?
04-28-2014, 01:52 AM
Post: #1
HTML5 video tag won't work no matter what browser I use?
Ok, so here's the problem.
I'm trying to put a video in my html document by using the html5 video tag, but nothing I do works.
This is how I wrote the code in my html document.

<video width="300" height="150" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

I downloaded the video from youtube using ClipGrap and I made sure it's an MP4 file. I also saved it in the same folder as my html and css documents.
I also made sure that Google Chrome supports MP4 and it does, but the video doesn't play. I've also used Opera and Safari and no luck with them either.
What am I doing wrong? Can anyone tell me?
Btw, I'm using w3schools.com to learn about this stuff.
Why can't I respond to your answer???????????

Ads

Find all posts by this user
Quote this message in a reply
04-28-2014, 02:00 AM
Post: #2
 
Try using the webm format instead. It should be supported by most browsers (Firefox doesn't support mp4 because it is a proprietary format).

I tested your code like this:

<video width="640" height="360" autoplay>
<source src="video.webm" type="video/webm">
<source src="video.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Both Chrome and Firefox (and even IE 11) played it just fine.
The only time it didn't work was when I accidentally had used movie.mp4 as the filename in the source tag since my test file is called video.

I used JDownloader to grab the video but that shouldn't matter, your video player does play it, right?

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)