mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added errorcodes for errorHandler. Removes big problems with unwanted skipping of video when ID's not loaded yet
This commit is contained in:
@@ -223,7 +223,7 @@ function getTitle(titt, v)
|
|||||||
function errorHandler(newState)
|
function errorHandler(newState)
|
||||||
{
|
{
|
||||||
var failsafe = ytplayer.getVideoUrl().split("https://www.youtube.com/watch");
|
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(video_id);
|
||||||
console.log(ytplayer.getVideoUrl());
|
console.log(ytplayer.getVideoUrl());
|
||||||
|
|||||||
Reference in New Issue
Block a user