ScrollMagic Pinning Causes Video to be paused
Opened this issue · 1 comments
bradleylancaster commented
When i pin the video or video container using ScrollMagic the video remains paused.
I don't know how to manually test to try play the video or select the video.
How do i pause() play the video to test this? The video is buried inside the div. Does this plugin have a method of playing and pausing?
Thanks
fernandolujan commented
I know this issue is a bit old but I figured I'd comment on my solution in case somebody else runs into this in the future. Videos contained within a pinned parent element are paused due to the DOM tree modifications made by ScrollMagic on initialization.
Basically, I had to manually play the video in my scene's "enter" event.
scene
.setPin('[data-scroll-step-label="7"]')
.on('enter', () => video.play())
.addTo(controller)