russellsamora / scrollama

Scrollytelling with IntersectionObserver.

Home Page:https://russellsamora.github.io/scrollama/basic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Force trigger check manually

Jugibur opened this issue · comments

In my case a YT-video hit the trigger after initial loading (without scrolling).
Problem is, that the Youtube player isn't ready a this time.
Is there as way to force scrollama for checking plus sending the onEnter-event manually after the player is ready?

i'd probably suggest storing the onEnter event value locally, then when the YT player loads, check to see what that value is (if it hasn't entered or not). otherwise there would be a decent amount of new logic to destroy and reset the intersection observers.