Started working on implementing official YT iframe-embed API

This commit is contained in:
rainbow napkin 2025-05-07 08:17:38 -04:00
parent 047c368b70
commit 1344756449
3 changed files with 69 additions and 2 deletions

View file

@ -24,6 +24,7 @@ class settingsPanel extends panelObj{
docSwitch(){
this.youtubeSource = this.panelDocument.querySelector("#settings-panel-youtube-source select");
this.renderSettings();
this.setupInput();
}
@ -31,7 +32,12 @@ class settingsPanel extends panelObj{
this.youtubeSource.addEventListener('change', this.updateYoutubeSource.bind(this));
}
renderSettings(){
this.youtubeSource.value = localStorage.getItem("ytPlayerType");
}
updateYoutubeSource(){
localStorage.setItem("ytPlayerType", this.youtubeSource.value);
client.processConfig("ytPlayerType", this.youtubeSource.value);
}
}