Killed harmless bug related to official YT Api that cluttered the console.

This commit is contained in:
rainbow napkin 2025-11-10 20:31:07 -05:00
parent eaca9db987
commit ecebcf0d32

View file

@ -337,6 +337,8 @@ function onYouTubeIframeAPIReady(){
//Set embed api to true //Set embed api to true
client.ytEmbedAPILoaded = true; client.ytEmbedAPILoaded = true;
//If the player is ready and has a mediaHandler loaded
if(client.player != null && client.player.mediaHandler != null){
//Get currently playing item //Get currently playing item
const nowPlaying = client.player.mediaHandler.nowPlaying; const nowPlaying = client.player.mediaHandler.nowPlaying;
@ -345,6 +347,7 @@ function onYouTubeIframeAPIReady(){
//Restart the video now that the embed api has loaded //Restart the video now that the embed api has loaded
client.player.start({media: nowPlaying}); client.player.start({media: nowPlaying});
} }
}
} }
const client = new channel(); const client = new channel();