From 28ff188f967722abd2366ef9a77313aa220369dc Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Tue, 16 May 2017 12:45:39 -0500 Subject: [PATCH] fix(remotecontrol): Controller enabled property --- modules/remotecontrol/Controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/remotecontrol/Controller.js b/modules/remotecontrol/Controller.js index ea5cbab17..f876cc591 100644 --- a/modules/remotecontrol/Controller.js +++ b/modules/remotecontrol/Controller.js @@ -97,7 +97,7 @@ export default class Controller extends RemoteControlParticipant { * null(the participant has left). */ requestPermissions(userId: string, eventCaptureArea: Object) { - if (!this.enabled) { + if (!this._enabled) { return Promise.reject(new Error('Remote control is disabled!')); } @@ -166,7 +166,7 @@ export default class Controller extends RemoteControlParticipant { _handleReply(participant: Object, event: Object) { const userId = participant.getId(); - if (this.enabled + if (this._enabled && event.name === REMOTE_CONTROL_EVENT_NAME && event.type === EVENT_TYPES.permissions && userId === this._requestedParticipant) { @@ -205,7 +205,7 @@ export default class Controller extends RemoteControlParticipant { * @returns {void} */ _handleRemoteControlStoppedEvent(participant: Object, event: Object) { - if (this.enabled + if (this._enabled && event.name === REMOTE_CONTROL_EVENT_NAME && event.type === EVENT_TYPES.stop && participant.getId() === this._controlledParticipant) { @@ -239,7 +239,7 @@ export default class Controller extends RemoteControlParticipant { * @returns {void} */ resume() { - if (!this.enabled || this._isCollectingEvents || !this._area) { + if (!this._enabled || this._isCollectingEvents || !this._area) { return; } logger.log('Resuming remote control controller.');