HTML5 video tag
Here is the issue:
GoDaddy will not allow me to playback any uploaded videos for the HTML5 video tag. So I looked up the issue and was told to edit the htaccess file to add the following:
After adding those, it still won't work. The file is in the root directory and I tried moving it around to see if that would help, but no luck. Any suggestions?
The video does work on my computer on my wamp server, so the video is fine and everything is coded properly.
Your .htaccess code seems to be malformed. Try:
Then use a server response checker to make sure that the server is sending the indicated MIME types when you try to access such files so you can be sure this isn't the cause of any problems.
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
When I ran the checker this is what it told me. I also made the changes to the htaccess file. Still same issue.
HTTP/1.1 200 OK
Date: Sat, 21 Jan 2012 17:42:02 GMT
The problem is that you're running on a Microsoft IIs server and this code is for Apache-based servers. While there are ways to use .htaccess on Microsoft IIs servers, I doubt GoDaddy supports such a solution on shared hosting accounts. You might request GoDaddy change their servers to support these file types directly, but I wouldn't expect them to agree.
There might be a way to add some ASP code to your pages to handle this automatically like .htaccess does on Apache servers, but the only solution I can think of would be to write a PHP script that would fetch the media file, send the correct MIME type header for you, and then echo the file contents. Then you'd set your HTML <video> tags to point to this script with a query string that would include the actual file name. It would be a kludge, but it would probably work. Sorry I can't be of more help. Good luck!
I figured it out finally. I had to set up a linux based hosting account, then upload the .htaccess file with the mime types. It works! I guess windows hosting account won't work with the HTML5 video tag. Thanks for your help, you put me in the right direction.
It's not that the tag won't work with a IIs server, it's just that the server has to be properly configured to use the proper MIME-type headers for these particular kinds of video files. But I'm glad you got it sorted. Good luck!
This may really sound stupid but how do I actually create the .htaccess file? Do I do it in Notepad? Does it take an extension? It looks like it already is an extension (with the dot in front). Any help would be appreciated.
upload to YouTube, embed player in your website, problem solved.
Please remember to wrap any code you have in forum tags:-
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
It's not that easy. We need to be able to track views from different sources and mediums. I don't believe there's a way to do that with embedded YouTube videos.
Disregard my post above. I thought this was related to a different post on web video.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread