I am struggling with setting up the loop for youtube videos using youtube player api.
The problem is that the video is not running under a loop.
Here is my c
If the video isn't changing, you can just do
onStateChange: function(e) { if (e.data === YT.PlayerState.ENDED) { player.playVideo(); } }
This will prevent unnecisarily reloading the video