Ver código fonte

Renames some variables.

master
damencho 9 anos atrás
pai
commit
e8739706e1
2 arquivos alterados com 8 adições e 8 exclusões
  1. 5
    5
      modules/RTC/JitsiLocalTrack.js
  2. 3
    3
      modules/RTC/RTC.js

+ 5
- 5
modules/RTC/JitsiLocalTrack.js Ver arquivo

29
             this.dontFireRemoveEvent = false;
29
             this.dontFireRemoveEvent = false;
30
         }.bind(this));
30
         }.bind(this));
31
     this.initialMSID = this.getMSID();
31
     this.initialMSID = this.getMSID();
32
-    this.inMuteOrUnmuteProcess = false;
32
+    this.inMuteOrUnmuteProgress = false;
33
 }
33
 }
34
 
34
 
35
 JitsiLocalTrack.prototype = Object.create(JitsiTrack.prototype);
35
 JitsiLocalTrack.prototype = Object.create(JitsiTrack.prototype);
62
 {
62
 {
63
     return new Promise(function (resolve, reject) {
63
     return new Promise(function (resolve, reject) {
64
 
64
 
65
-        if(this.inMuteOrUnmuteProcess) {
65
+        if(this.inMuteOrUnmuteProgress) {
66
             reject(new Error(JitsiTrackErrors.TRACK_MUTE_UNMUTE_IN_PROGRESS));
66
             reject(new Error(JitsiTrackErrors.TRACK_MUTE_UNMUTE_IN_PROGRESS));
67
             return;
67
             return;
68
         }
68
         }
69
-        this.inMuteOrUnmuteProcess = true;
69
+        this.inMuteOrUnmuteProgress = true;
70
 
70
 
71
         this._setMute(mute,
71
         this._setMute(mute,
72
             function(){
72
             function(){
73
-                this.inMuteOrUnmuteProcess = false;
73
+                this.inMuteOrUnmuteProgress = false;
74
                 resolve();
74
                 resolve();
75
             }.bind(this),
75
             }.bind(this),
76
             function(status){
76
             function(status){
77
-                this.inMuteOrUnmuteProcess = false;
77
+                this.inMuteOrUnmuteProgress = false;
78
                 reject(status);
78
                 reject(status);
79
             }.bind(this));
79
             }.bind(this));
80
     }.bind(track));
80
     }.bind(track));

+ 3
- 3
modules/RTC/RTC.js Ver arquivo

191
  * @returns {Promise}
191
  * @returns {Promise}
192
  */
192
  */
193
 RTC.prototype.setAudioMute = function (value) {
193
 RTC.prototype.setAudioMute = function (value) {
194
-    var mutes = [];
194
+    var mutePromises = [];
195
     for(var i = 0; i < this.localStreams.length; i++) {
195
     for(var i = 0; i < this.localStreams.length; i++) {
196
         var stream = this.localStreams[i];
196
         var stream = this.localStreams[i];
197
         if(stream.getType() !== "audio") {
197
         if(stream.getType() !== "audio") {
198
             continue;
198
             continue;
199
         }
199
         }
200
         // this is a Promise
200
         // this is a Promise
201
-        mutes.push(stream.mute(value));
201
+        mutePromises.push(stream.mute(value));
202
     }
202
     }
203
     // we return a Promise from all Promises so we can wait for their execution
203
     // we return a Promise from all Promises so we can wait for their execution
204
-    return Promise.all(mutes);
204
+    return Promise.all(mutePromises);
205
 }
205
 }
206
 
206
 
207
 RTC.prototype.removeLocalStream = function (stream) {
207
 RTC.prototype.removeLocalStream = function (stream) {

Carregando…
Cancelar
Salvar