You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that, when I use e.target.playVideo() inside onStateChange, sometimes it works and sometimes it does not work.
I tried to create an interval to check the player state. But when it does not play the video, player state always returns -1. Even when I can clearly see that the video is loaded inside UI and even seek bar starts to buffer.
What could be the problem? How can I debug this or fix this?
Thanks
The text was updated successfully, but these errors were encountered:
It's properly working for me. The only difference is I don't use window checker to render the component. and Also I've attached onReady event handler that plays the video.
I'm using your library to play YouTube videos. I'm using it inside a next.js app.
Here's my code:
The problem is that, when I use
e.target.playVideo()
insideonStateChange
, sometimes it works and sometimes it does not work.I tried to create an interval to check the player state. But when it does not play the video, player state always returns -1. Even when I can clearly see that the video is loaded inside UI and even seek bar starts to buffer.
What could be the problem? How can I debug this or fix this?
Thanks
The text was updated successfully, but these errors were encountered: