Streaming live at 10am (PST)

'Stop background video loop' hack suddenly stopped working


#1

Continuing the discussion from Stop a background video:

I recently implemented this successfully but it suddenly stopped working.

@samliew and @mdiamond24, are your implementations of this still working?

Thanks

Read-only link:
https://preview.webflow.com/preview/planet-reed?preview=ab08f7e58e998448bfdda11a0e3608b1

Published link:

Specific page with issue:
http://planet-reed.webflow.io/vault

04


#2

Welcome to the Webflow forum!

Could you please edit Screenshot_2017-08-16_140811 and provide ALL the necessary details in your post so we can take a look at your site/issue?

In future if you want faster replies and more accurate answers, I suggest including all the details listed in the link above before someone has to ask.

Hope to hear from you soon. Thanks!


#3

Apologies. Done. Also included url of the specific page related to this issue. Cheers.


#4

I am also experiencing this issue on sites I have previously used the same code on. Now it is not working.


#5

Here’s the new code:

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

Replace Vaultvideo with the ID of the background video component.


#6

Thanks @samliew, all working again.


#7

Hey, I tried to load the script into the code area, set my ID and then published to the test but it still plays in a loop for the video.

The goal is to have it run the video and end on the very last screen of the video. Is that possible?

I’m a bit surprise with Webflow. For all the great features and controls that the software offers, they greatly lack on very basic video control options.


#8

Code is good and It’s working on all my sites. I know the ID element is case sensitive so only thing I can suggest is looking to see if you are using a capital V in the ID. Sorry I can’t be more help.


#9

I’ve only got one instance of this code and it’s working well.