Started working on implementing official YT iframe-embed API
This commit is contained in:
parent
047c368b70
commit
1344756449
3 changed files with 69 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue