I’ve done a ton of Google searching regarding html & videos, and can not figure out how to get this mp4 video to not autoplay when the page loads. I thought the autoplay=“false” should do it, but it doesn’t.
What am I missing?
The cell’s code is:
video = html`
<iframe width="560" height="315" src="https://soe-wbe-pilot.wl.r.appspot.com/static/scan_wbe_overview.mp4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay="false"; clipboard-write; encrypted-media; gyroscope; controls=true; picture-in-picture" allowfullscreen></iframe>`
Hi Zan! Since you’ve got a link to the mp4 video directly (and it’s not e.g. a YouTube embed), I recommend using the simpler video element instead of an iframe. Something like this should do it:
video = htl.html`
<video width="560" height="315" controls>
<source src="https://soe-wbe-pilot.wl.r.appspot.com/static/scan_wbe_overview.mp4">
</video>`
Video elements do not autoplay by default, so you shouldn’t have an autoplay issue.