Open shmdhussain opened 6 years ago
Since Intersection Observer is getting famous, is it on the road?
Also interested in the status here: Is it coming?
Would you guys say IntersectionObserver results in better performance compared to this ScrollMagic pattern for playing videos only in view?
document.querySelectorAll("video.play-in-view-only").forEach((video) => {
let scene = new ScrollMagic.Scene({
triggerElement: video,
triggerHook: 1,
duration: () => window.innerHeight + el.clientHeight
})
.on("enter", () => { video.play() })
.on("leave", () => { video.pause() })
.addTo(controller)
})
@katerlouis interesting question. I'm interested too in an answer
I'm also interested in how the Intersection Observer can be used either within/with this library.
Thanks team for giving us this nice plugin, Like to know one thing , Is intersection observer is supported in scrollmagic? else do you have any plans to do it in future?