-
Notifications
You must be signed in to change notification settings - Fork 56
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
Access to onPlaybackRateChange event #40
Comments
I do not know why in your case the Here is the example how it works in my project:
Also I did not find |
Yeah, you're right, this definitely works. I was taking the youtube api docs too literally. They ask for a string representation of a listener function, not the function itself. I should have just tried it - and yes, I meant onPlaybackRateChange. Thanks, feel free to close... but maybe in the long term you could support more events at the vue template level. |
Hi, first of all, thank you for this great project.
I apologize if I just missed something in the docs about how to do this, but it seems that some of the events from the youtube api are not accessible directly through vue-youtube with an @event binding in the template. As the subject of this email imples, I'm specifically interested in onPlaybackChange - although onStateChange would be nice too.
I do see that you have access to the addEventListener method of the player, which allows you to add the name of function to call. So, something like, this.player.addEventListener('onPlaybackChange', 'myFunction'). But, as far as I can tell the 'myFunction" needs to live on the global window. Maybe there is a better way to do this, but for now I'm putting a function on "window", which is not ideal.
Once again thanks.
The text was updated successfully, but these errors were encountered: