I’m using the <video>
tag in a HTML code for a website.
The video will work without any issues on PC, but as soon as I load the site on my phone it will load but wont play, and on another phone in the exact same browser (safari) it wont play unless clicked on and it opens a window (pop out) for it.
This is the code for the HTML that I tried so far…
<div class="video_container">
<video
autoplay
muted
loop
src="./resources/videos/excursion.mp4"
type="video/mp4"
>
Video not compatible with your browser
</video>
If you require any additional information please let me know.
2
Answers
try playsinline in video tag
Try having both video formats and give it a height and a width.
Happy Coding!