mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Use underscore in WebSocket API
This commit is contained in:
@@ -334,7 +334,7 @@ class ClapperPlayer extends PlayerBase
|
|||||||
_onStateChanged(player, state)
|
_onStateChanged(player, state)
|
||||||
{
|
{
|
||||||
this.state = state;
|
this.state = state;
|
||||||
this.emitWs('state-changed', state);
|
this.emitWs('state_changed', state);
|
||||||
|
|
||||||
if(state !== GstPlayer.PlayerState.BUFFERING) {
|
if(state !== GstPlayer.PlayerState.BUFFERING) {
|
||||||
let root = player.widget.get_root();
|
let root = player.widget.get_root();
|
||||||
@@ -362,8 +362,8 @@ class ClapperPlayer extends PlayerBase
|
|||||||
|
|
||||||
_onStreamEnded(player)
|
_onStreamEnded(player)
|
||||||
{
|
{
|
||||||
debug('stream ended');
|
debug(`end of stream: ${this._trackId}`);
|
||||||
this.emitWs('stream-ended', this._trackId);
|
this.emitWs('end_of_stream', this._trackId);
|
||||||
|
|
||||||
this._trackId++;
|
this._trackId++;
|
||||||
|
|
||||||
@@ -645,12 +645,11 @@ class ClapperPlayer extends PlayerBase
|
|||||||
_onWsData(server, action, value)
|
_onWsData(server, action, value)
|
||||||
{
|
{
|
||||||
switch(action) {
|
switch(action) {
|
||||||
case 'toggle-play':
|
case 'toggle_play':
|
||||||
this.toggle_play();
|
|
||||||
break;
|
|
||||||
case 'play':
|
case 'play':
|
||||||
case 'pause':
|
case 'pause':
|
||||||
this[action]();
|
case 'set_media':
|
||||||
|
this[action](value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
super._onWsData(server, action, value);
|
super._onWsData(server, action, value);
|
||||||
|
Reference in New Issue
Block a user