Implemented official yt iframe embed player support.

This commit is contained in:
rainbow napkin 2025-05-10 12:23:33 -04:00
parent 1b0caa5e02
commit 473b54356e
3 changed files with 181 additions and 21 deletions

View file

@ -39,7 +39,7 @@ class channel{
//Set defaults for any unset settings and run any required process steps for the current config
this.setDefaults(false, true);
//Freak out any weirdos who take a peek in the dev console for gaffs
//Freak out any weirdos who take a peek in the dev console for shits n gigs
console.log("👁️👄👁️ 𝓊𝓃𝒿𝓊𝓇.");
}
@ -152,6 +152,22 @@ class channel{
}
}
//If the player or mediaHandler isn't loaded
if(this.player == null || this.player.mediaHandler == null){
//We're fuggin done here
return;
}
//Get current video
const nowPlaying = this.player.mediaHandler.nowPlaying;
//If we're playing a youtube video
if(nowPlaying != null && nowPlaying.type == 'yt'){
//Restart the video
this.player.start({media: nowPlaying});
}
//Stop while we're ahead
return;
}