mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added failsafe for error
This commit is contained in:
@@ -222,7 +222,8 @@ function getTitle(titt, v)
|
||||
|
||||
function errorHandler(newState)
|
||||
{
|
||||
if(video_id !== undefined)
|
||||
var failsafe = ytplayer.getVideoUrl().split("https://www.youtube.com/watch");
|
||||
if(video_id !== undefined && !failsafe[0] == "" && !failsafe[1] == "")
|
||||
{
|
||||
console.log(video_id);
|
||||
console.log(ytplayer.getVideoUrl());
|
||||
@@ -233,6 +234,8 @@ function errorHandler(newState)
|
||||
|
||||
function onPlayerReady(event) {
|
||||
player_ready = true;
|
||||
console.log(ytplayer.getVideoUrl());
|
||||
console.log(ytplayer.getVideoUrl().split("https://www.youtube.com/watch"));
|
||||
if(!window.mobilecheck())
|
||||
{
|
||||
$("#player").css("opacity", "1");
|
||||
|
||||
Reference in New Issue
Block a user