Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollMagic Pinning Causes Video to be paused #200

Open
bradleylancaster opened this issue Nov 6, 2016 · 1 comment
Open

ScrollMagic Pinning Causes Video to be paused #200

bradleylancaster opened this issue Nov 6, 2016 · 1 comment

Comments

@bradleylancaster
Copy link

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
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants