Integrate basic web server functionality into player

This commit is contained in:
Rafostar
2020-12-11 23:38:49 +01:00
parent 26f8b6994e
commit d5d5aa9bac
3 changed files with 60 additions and 0 deletions

View File

@@ -639,6 +639,22 @@ class ClapperPlayer extends PlayerBase
return true;
}
_onWsData(server, action, value)
{
switch(action) {
case 'toggle-play':
this.toggle_play();
break;
case 'play':
case 'pause':
this[action]();
break;
default:
super._onWsData(server, action, value);
break;
}
}
_onCloseRequest(window)
{
this._performCloseCleanup(window);