Pass WebSocket data without additional signal connection

This commit is contained in:
Rafostar
2020-12-15 12:36:06 +01:00
parent 2b62900227
commit b4e52d654b
3 changed files with 24 additions and 37 deletions

View File

@@ -251,6 +251,21 @@ class ClapperPlayer extends PlayerBase
this[action]();
}
receiveWs(action, value)
{
switch(action) {
case 'toggle_play':
case 'play':
case 'pause':
case 'set_media':
this[action](value);
break;
default:
super.receiveWs(action, value);
break;
}
}
_setHideCursorTimeout()
{
this._clearTimeout('hideCursor');
@@ -642,21 +657,6 @@ class ClapperPlayer extends PlayerBase
return true;
}
_onWsData(server, action, value)
{
switch(action) {
case 'toggle_play':
case 'play':
case 'pause':
case 'set_media':
this[action](value);
break;
default:
super._onWsData(server, action, value);
break;
}
}
_onCloseRequest(window)
{
this._performCloseCleanup(window);