Procházet zdrojové kódy

fix(remotecontrol): Controller enabled property

j8
hristoterezov před 8 roky
rodič
revize
28ff188f96
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4
    4
      modules/remotecontrol/Controller.js

+ 4
- 4
modules/remotecontrol/Controller.js Zobrazit soubor

@@ -97,7 +97,7 @@ export default class Controller extends RemoteControlParticipant {
97 97
      * null(the participant has left).
98 98
      */
99 99
     requestPermissions(userId: string, eventCaptureArea: Object) {
100
-        if (!this.enabled) {
100
+        if (!this._enabled) {
101 101
             return Promise.reject(new Error('Remote control is disabled!'));
102 102
         }
103 103
 
@@ -166,7 +166,7 @@ export default class Controller extends RemoteControlParticipant {
166 166
     _handleReply(participant: Object, event: Object) {
167 167
         const userId = participant.getId();
168 168
 
169
-        if (this.enabled
169
+        if (this._enabled
170 170
                 && event.name === REMOTE_CONTROL_EVENT_NAME
171 171
                 && event.type === EVENT_TYPES.permissions
172 172
                 && userId === this._requestedParticipant) {
@@ -205,7 +205,7 @@ export default class Controller extends RemoteControlParticipant {
205 205
      * @returns {void}
206 206
      */
207 207
     _handleRemoteControlStoppedEvent(participant: Object, event: Object) {
208
-        if (this.enabled
208
+        if (this._enabled
209 209
                 && event.name === REMOTE_CONTROL_EVENT_NAME
210 210
                 && event.type === EVENT_TYPES.stop
211 211
                 && participant.getId() === this._controlledParticipant) {
@@ -239,7 +239,7 @@ export default class Controller extends RemoteControlParticipant {
239 239
      * @returns {void}
240 240
      */
241 241
     resume() {
242
-        if (!this.enabled || this._isCollectingEvents || !this._area) {
242
+        if (!this._enabled || this._isCollectingEvents || !this._area) {
243 243
             return;
244 244
         }
245 245
         logger.log('Resuming remote control controller.');

Načítá se…
Zrušit
Uložit