I have the following code:
<video controls autoplay> <source src="video/myVideo.mp4" type="video/mp4"> <source src="video/myVideo.webm" type="video/webm"> <source src="video/myVideo.ogv" type="video/ogg"> </video>
The video:
Tried
<video controls autoplay>...</video> <video controls autoplay="1">...</video> <video controls autoplay="autoplay">...</video>
Nothing worked in Chrome
Then I also tried changing the codec, as recommended in https://en.wikipedia.org/wiki/HTML5_video, but it also did not work:
<source src="movie.webm" type='video/webm; codecs="vp8.0, vorbis"'> <source src="movie.ogv" type='video/ogg; codecs="theora, vorbis"'> <source src="movie.mp4" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'>
So now I am at a dead end. Thanks for any pointers! Much appreciated.
The autoplay attribute is a boolean attribute. When present, the video will automatically start playing. Note: Chromium browsers do not allow autoplay in most cases. However, muted autoplay is always allowed.
Step 1 - Open the Google Chrome browser. Step 3 - Click the Autoplay policy drop-down and select "No user gesture is required." This will make it so that you don't need to intereact with the page in order for the video or audio to start playing automatically. Step 4 - Restart the browser.
For playing the videos on web browsers, there is a new type of video element designed that is HTML5. If you see the message “HTML5 video not found” while playing a video on a web page, it means your browser doesn't support the HTML5 format codecs or missed some video codecs.
The actual Chrome policy is: Autoplay with sound is (only) allowed if: The user has interacted with the domain (click, tap, etc.). On desktop, the user's Media Engagement Index (MEI) threshold has been crossed, meaning the user has previously played video with sound.
You need to add playsinline autoplay muted loop
because Chrome does not allow a video to autostart if it is not muted. Also, right now I don't know why it is not working in all Android devices. I'm trying to look if it's version specific, if I find something I'll let you know.
Chrome issue: After some research I have found that it doesn't work on Chrome sometimes because in responsive you can activate the data saver, and it blocks any video to autostart.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With