Streaming live at 10am (PST)

Make a Background Video Play Once (No Loop)

#1

Hi All,

Is there a way to make a background video play just once? This doesn’t work for me:

Thanks.

Niall

#2

The code you need for this is as follows

<script type="text/javascript">
document.getElementById('Video').removeAttribute("data-loop");
</script>
#3

Thanks for response. This doesn’t work for me unfortunately. Still looping.

#4

Can you share your read only and webflow staging webflow domain please?

#5

https://hummingbird-site.webflow.io/

https://preview.webflow.com/preview/hummingbird-site?utm_source=hummingbird-site&preview=dbcda7ae174fd64f182e8b268309f79f

Thanks

#6

Here’s a new code:

<script>
Webflow.push(function() {
  document.getElementById('video').querySelector('video').removeAttribute('loop');
});
</script>
#7

Thanks a million. That worked :slight_smile:

1 Like
#8

I’m glad I could help.