Implemented official yt iframe embed player support.
This commit is contained in:
parent
1b0caa5e02
commit
473b54356e
3 changed files with 181 additions and 21 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue