From db0baa1c4678c0aa600d2cb877643cd554102591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Wed, 29 Apr 2015 19:35:00 +0200 Subject: [PATCH] Added errorcodes for errorHandler. Removes big problems with unwanted skipping of video when ID's not loaded yet --- static/js/youtube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/youtube.js b/static/js/youtube.js index 889bffff..9d8a4ab1 100755 --- a/static/js/youtube.js +++ b/static/js/youtube.js @@ -223,7 +223,7 @@ function getTitle(titt, v) function errorHandler(newState) { var failsafe = ytplayer.getVideoUrl().split("https://www.youtube.com/watch"); - if(video_id !== undefined && !failsafe[0] == "" && !failsafe[1] == "") + if(newState.data == 5 || newState.data == 100 || newState.data == 101 || newState.data == 150) { console.log(video_id); console.log(ytplayer.getVideoUrl());