0

I must start by saying I'm a newbie to html. I start from scratch and I try to do it the right way. I've got a lot of help from stack overflow and most of my problems were solved by other's requests for help. But I don't seem to get an answer to a simple problem I got. I've checked several answers to this problem, but none of it works for me. MY PROBLEM: my videos only plays on Safari and at no other browser.

The most relevant post was the following: HTML5 video won't play in Chrome only I tried the correct order and re-converting my files to mp4, ogg and webm using Miro converter but both didn't work. I added the codecs in to my code but this doesn't change anything. I added plays-inline as well from another relevant post but nothing...

My code is the following:

<!-- LANDING PAGE VIDEO - INTRO VIDEO -->
<video class="videoIntro" id="SiteIntro" autoplay="no-repeat" poster="VMF_MENU.png" plays-inline>
    <source src="videos/Site_Intro.mp4" type="video/mp4">
    <source src="videos/Site_Intro.webm" type="video/webm" codecs="vp8, vorbis">
    <source src="videos/Site_Intro.m4v" type="video/mp4" codecs="avc1.42E01E, mp4a.40.2">
    <source src="videos/Site_Intro.ogv" type="video/ogg" codecs="theora, vorbis">
</video>

I got no error messages (expected). What do you suggest I try to correct this? Thank you in advance!

Kaiido
  • 123,334
  • 13
  • 219
  • 285
  • What if you try to load this video directly from the browser (type the url directly in the address bar)? Also, you should get errrors in the developer tools' console. If you don't, on Chrome you may want to check what `chrome://media-internals/` page has to say. – Kaiido Aug 19 '19 at 07:32
  • Thank you VERY much for the prompt reply. Your suggestion was interesting. When I put directly the video at the browser the video works. After some tries, I figured that when I put a link to the actual videos (eg. http://vforvenusfm.space/videos/StarsBackground.mp4) the videos are played properly. AND if I just delete the "/videos/StarsBackground.mp4" and I load my page once more it works like a charm! (well almost, its a pre-mature version of it). I used Chrome. I tried to put the direct link at the HTML file but it doesn't change the behaviour. So what do you think is causing this behaviour? – Georgios Stylianopoulos Aug 20 '19 at 09:06
  • I'm not really clear what the problem is, as the video seems to load in Chrome for me. It would be more helpful if you could show your error in a working sample like this: https://jsfiddle.net/Callmetimm/ua2k4bne/. Also I wouldn't bother with all those other file formats these days, mp4 should cover your basic browsers. See https://caniuse.com/#search=mp4 – TimHayes Aug 21 '19 at 17:10
  • Thanks for your help @TimHayes! Actually, what I found was that for some peculiar reason I had to split my intro section and main page in half. But you suggestion to check it in jsfiddle helped me a lot because I did the following: I just tried your jsfiddle including only one video and it worked for me at Chrome. But not in Safari. So I erased Safari's last hour history and done! Video works again! Actually, it's an error I have found in general in Safari. Sometimes you change some things in CSS file or in the htmp/php file and you see no result in Safari. Just erase the history+refresh! – Georgios Stylianopoulos Sep 18 '19 at 07:27

0 Answers0