Completed buildPlayer method for youtubeEmbedHandler

This commit is contained in:
rainbow napkin 2025-05-08 08:22:42 -04:00
parent 1344756449
commit 1b0caa5e02
6 changed files with 43 additions and 19 deletions

View file

@ -163,7 +163,7 @@ class channel{
}
//Youtube iframe-embed API load handler
function onYoutubeIframeAPIReady(){
function onYouTubeIframeAPIReady(){
//Set embed api to true
client.ytEmbedAPILoaded = true;
@ -171,7 +171,7 @@ function onYoutubeIframeAPIReady(){
const nowPlaying = client.player.mediaHandler.nowPlaying;
//If we're playing a youtube video and the official embeds are enabled
if(nowPlaying.type == 'yt' && localStorage.get('ytPlayerType') == "embed"){
if(nowPlaying.type == 'yt' && localStorage.getItem('ytPlayerType') == "embed"){
//Restart the video now that the embed api has loaded
client.player.start({media: nowPlaying});
}