question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML5 video autoplay in chrome

See original GitHub issue

Hi! I am trying to improve a project I have recently finished. Facing some issues when it comes to html5 video autoplay in Chrome. I think it’s connected to how Choo works but might be mistaken. I appreciate any help. See behaviour below.

Expected behavior

Starts autoplay of video when visiting address in chrome.

Actual behavior

Shows first frame. Plays only if navigating away within the app and navigating back. Not on direct landing via browsers address bar.

Steps to reproduce behavior

Visit https://josefinelaul.com/404 in Chrome Video doesn’t start Navigate away using the arrow in the corner. Then navigate back using the browsers navigation buttons. Now it plays.

I use the code as follows

<video id="MyVideo" autoplay="autoplay" loop="loop" muted="muted" playsinline="playsinline" src="/content/3-404/leaves.mp4" class="w100"></video>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
caiogondimcommented, Oct 24, 2018

Hi there. I have to deal with this almost every day on my work. It’s a quite hairy topic, but a TL;DR is:

2reactions
tornqvistcommented, Oct 19, 2018

Like @goto-bus-stop says autoplaying video is a real hassle. In the case of quantified planet we’re actually attaching listeners for the canplay event and trigger play programmatically and switching between a short video and a longer one once loaded. You can check out the source code for the video player is here: https://github.com/codeandconspire/quantifiedplanet.org/blob/master/components/story/video.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML 5 Video "autoplay" not automatically starting in CHROME
You need to add playsinline autoplay muted loop because Chrome does not allow a video to autostart if it is not muted. Also,...
Read more >
How to autoplay a video using HTML 5 in Chrome - SkillForge
How to autoplay a video using HTML 5 in Chrome. HTML5, Uncategorized, Web Design. Chrome is a great browser but sometimes it has...
Read more >
Disable HTML5 Autoplay (Reloaded)
To deactivate a function, simply uncheck the related item from toolbar-panel. With this extension you will never have to worry about videos auto ......
Read more >
[Solved] HTML5 Video autoplay not working on mobile and ...
Hi RichardSa,. Chrome does not allow autoplay if the video is not muted. So to autoplay video you need to set both autoplay...
Read more >
HTML5 video autoplay for Chrome policy - Denis Bouquet
The autoplay policy changed in April 2018 for Chrome. Autoplay is currently restricted in the following environments: Chrome version 66+ (Desktop/Android)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found