Send player state via WebSockets

This commit is contained in:
Rafostar
2020-12-12 19:37:07 +01:00
parent 7a039af798
commit ea7b712b2e
2 changed files with 11 additions and 0 deletions

View File

@@ -181,6 +181,14 @@ class ClapperPlayerBase extends GstPlayer.Player
this.widget.queue_render();
}
emitWs(action, value)
{
if(!this.webserver)
return;
this.webserver.sendMessage({ action, value });
}
_onWsData(server, action, value)
{
debug(`unhandled WebSocket action: ${action}`);