How to detect if a youtube video is not playable?
I am aware there is a way by calling a request to the youtube api however this would take too much time to check for each video since the videos are playing on user request.
Is there a way to check on the status of the youtube player and if it does not play then act accordingly?
I know there a few status like ready, stopped, playing, qued. Couldnt find a status for this specific thing.
Thanks in advance
ok I have found the solution. But it wouldnt let me post it because im not cool enough like you guys. Here it is:
onYouTubePlayerReady = function() {
player.addEventListener("onError", "onPlayerError");
}
function onPlayerError(errorCode) {
playnext();
}
if you want to check for a certain error the error codes are on the youtube site. However this was enough for me.
If by ‘blocked’ you mean removed by the user, or removed because of copyright infringement, then your answer will be in this thread….