www.webdeveloper.com
Results 1 to 11 of 11

Thread: HTML5 video tag

  1. #1
    Join Date
    Apr 2009
    Posts
    33

    Exclamation 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:

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

    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.

  2. #2
    Join Date
    Mar 2011
    Posts
    1,139
    Your .htaccess code seems to be malformed. Try:
    Code:
    AddType video/ogg .ogv
    AddType video/mp4 .mp4
    AddType video/webm .webm
    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.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Apr 2009
    Posts
    33
    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
    Content-Length: 0
    Content-Type: text/html
    Server: Microsoft-IIS/7.0
    X-Powered-By: ASP.NET
    Date: Sat, 21 Jan 2012 17:42:02 GMT

  4. #4
    Join Date
    Mar 2011
    Posts
    1,139
    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!
    Rick Trethewey
    Rainbo Design

  5. #5
    Join Date
    Apr 2009
    Posts
    33
    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.

  6. #6
    Join Date
    Mar 2011
    Posts
    1,139
    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!
    Rick Trethewey
    Rainbo Design

  7. #7
    Join Date
    Dec 2013
    Posts
    1
    Rick:
    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.

  8. #8
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,346
    upload to YouTube, embed player in your website, problem solved.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  9. #9
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,122
    \\.\,

    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.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  10. #10
    Join Date
    Oct 2013
    Location
    3rd planet from the sun
    Posts
    165
    Quote Originally Posted by dyzguy View Post
    Rick:
    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.
    http://www.javascriptkit.com/howto/htaccess.shtml

  11. #11
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,122
    Disregard my post above. I thought this was related to a different post on web video.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles