cjameson
(Corey Jameson)
November 23, 2021, 2:03am
1
Smith.S
(: ))
November 23, 2021, 5:48pm
3
<script>
const bgVideoElement = document.querySelector("#video")
stopBgVideoFromLooping(bgVideoElement )
function stopBgVideoFromLooping (bgVideoEl){
bgVideoEl.querySelector('video').removeAttribute('loop')
}
</script>
This darn code should work.
Simplify version:
// #video is your background video component's ID
$('#video video').attr('loop',false)
Hey hey,
I’m having a similar issue. I am trying to embed a video - I want it to autoplay (muted), with controls but I don’t want it to loop. Everything works as intended except that it keeps looping. I tried adding the parameter “loop=0” but it didn’t work.
This is the read-only link:
https://preview.webflow.com/preview/aleksandrinas-practice-site?utm_medium=preview_link&utm_source=designer&utm_content=aleksandrinas-practice-site&preview=1a249b1d83184a9a74e384e7df9b92a8&workflow=preview
As Cory’s read-only link doesn’t work, I am not sure how to change the code to work in my case.
Thanks!
shersials
(Muhammad Zahid Sher Sial)
November 10, 2022, 4:51am
5
or allow me to use your workspace so I can configure the issue
add autoplay=0 to make it loop disable