Sia Sia - 17 days ago 4
HTML Question

Video background not displaying properly on some computer

I am meeting an error on my website and I can't put my finger on it, the custom video background I'm trying to implement works on some computers and doesn't on the some other.

It is not a problem of browser version since I tried it on 5 computers with the same versions and there is still 2 computer who fail to run the javascript on this specific area (it either works on all browser or the javascript goes off on all plateforms).

I think it is a problem of computer but what should I in order to make the JS of the video background work ? (If you can't pause or play the video, or if it launch as soon as you enter the page then you also have this issue)

Here is the website : www.fyz.ch/VR

Any thoughts ?

Answer

Maybe you need to convert the video in multiple file formats (mp4, webm and ogv).

I think you made a wrong structure for it and put a source tag outside of the video tag.

Add them like this :

<video>
    <source src="video.mp4" type="video/mp4" />
    <source src="video.webm" type="video/webm" />
    <source src="video.ogv" type="video/ogg" />

    Your browser doesn't support the video tag
</video>

Moreover, it seems like you added the autoplay attribute to the video tag. So it's the normal behavior for the video to launch itself as soon as the user enters the site.

Could you provide some code to be sure of what your problem is ?