www.webdeveloper.com
Results 1 to 7 of 7

Thread: [RESOLVED] html5 video, works local, but not on server

  1. #1
    Join Date
    Jun 2010
    Posts
    14

    resolved [RESOLVED] html5 video, works local, but not on server

    Code:
    <video src="path/to/video.ogv" controls="controls" width="400" height="600"  >Your browser does not support the video tag.</video>
    On local machine video works just fine, but as I upload it on server, I get just gray field with X in the middle

    Code:
    <video src="http://www.path/to/video.ogv" controls="controls" width="400" height="600"  >Your browser does not support the video tag.</video>
    no matter how the path is written... ('http://www...' or just 'path/to/video.ogv')

    As I try on local machine to put web path (www....) I get also same gray field with X in the middle...

    Is the videos format ok?

    Thank you

  2. #2
    Join Date
    Dec 2005
    Posts
    2,984
    Been here before, add the following to your .htaccess file on your server:

    Code:
    AddType video/ogg .ogv .ogg
    AddType video/webm .webm
    AddType video/mp4 .mp4
    (depending of course, which types your are actually using).
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  3. #3
    Join Date
    Jun 2010
    Posts
    14
    Hello aj_nsc,

    and thank you for prompt response.
    Also sorry for delayed response, I just could not manage before...

    Ok, I added .htaccess file in main domain, in subdomain (where site uses video) in folder where video resides.... none of that helped.... (I host on windows server, uploaded .htaccess with filezilla and file was visible on panel)

    But I got it working by adding mime type in my control panel...

    Here is site (for best performance you need html5 browser):
    http://www.switch.beezgetz.com/

    Thank you again aj_nsc for your input

  4. #4
    Join Date
    Aug 2011
    Posts
    51
    Hi there,

    Can you explain more detail about you did that made it work?

    Thank you.

  5. #5
    Join Date
    Jun 2010
    Posts
    14
    Oi, sure,

    I tried as suggested, but that did not do the trick.

    What I have is paying hosting, and I have c-panel, where I can create subdomains, mysql and other data bases and so on. On that same c-panel I have an option to set MIME types (for each domain/subdomain. I just added video formats as suggested to me (above in this thread) to my subdomain and that made it working...

    I guess it is a difference between paid and your own server. I guess paid servers do not let you modify the .htacces file, you are supposed to do that in c-panel... but I was wrong before...

    Keep us posted how it goes, or if I can help in any other way.

  6. #6
    Join Date
    Aug 2011
    Posts
    51
    Thank you for the details.

    I just want to correct a little bit. I have a paid server (well actually it's currently free) but I can access and do whatever I want with the files because I have the access to the OS through the use of SSH.

    I will surely keep in mind what you have mentioned above. I am sure there will be more people benefiting from your explanation as well..

  7. #7
    Join Date
    Jun 2010
    Posts
    14
    You have an SSH access on rented host?
    That is a rare flower khaha... So, off topics,
    you can access all folders on server, or just your folder?

    As I said, I am not quite sure of right answer... But if it works I wouldn't mess with it, hehe...

    I do believe that aj_nsc's approach is the right one,
    if I had my server(s) I surly would not have c-panel,
    so I would go aj_nsc's way.

    As I tried to do that way on my paid host (FTP) it had no effect.
    As I poked around I found out that I can set MIME types in my c-panel.
    And that now works.

    kind regards

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