How to determine if a video from YouTube is being played?
I know that there is a way by calling a request on youtube api, however it will take too much time to check each video, since the videos are played at the user's request.
Is there a way to check the status of the YouTube player and if it does not play, then proceed accordingly?
I know that there are several statuses, such as ready, stopped, playing, qued. Could not find status for this particular thing.
Thanks in advance
ok I found a solution. But that did not allow me to publish it, because I am not cool enough like you guys. Here he is:
onYouTubePlayerReady = function() { player.addEventListener("onError", "onPlayerError"); } function onPlayerError(errorCode) { playnext(); }
if you want to check for a specific error, the error codes are on the youtube website. However, that was enough for me.
javascript youtube
Marwan roushdy
source share