Przeglądaj źródła

fix(remotecontrol): Controller enabled property

j8
hristoterezov 8 lat temu
rodzic
commit
28ff188f96
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4
    4
      modules/remotecontrol/Controller.js

+ 4
- 4
modules/remotecontrol/Controller.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz