Streaming live at 10am (PST)

Stop Autoplay on Background Video


#1

Hey guys, having some trouble here. I want my bg video to stop playing after it plays once. I tried this solution but for some reason, it won’t work. I gave the background video an ID and I pasted the code into the body section of the page and published it. Any ideas?


#2

Figured it out.

The new code is: <script> Webflow.push(function() { document.getElementById(‘Video’).querySelector(‘video’).removeAttribute(‘loop’); }); </script>

I’m stupid.


#3

Site/page footer code:

<script>$('video').removeAttr('loop');</script>