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

Event Handler - Youtube #36

Open
paulnett opened this issue Feb 25, 2013 · 1 comment
Open

Event Handler - Youtube #36

paulnett opened this issue Feb 25, 2013 · 1 comment

Comments

@paulnett
Copy link

Is it possible to start a Youtube video once the page scrolls to a specific block?

@frederickjansen
Copy link

Sure, just use the onBlockChange event callback

playYoutubeOnBlockChange = function() {
    if (scrollorama.blockIndex === indexOfBlockYouNeed) {
        // Code to play youtube video
    }
};

scrollorama.onBlockChange(playYoutubeOnBlockChange);

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