|
@@ -127,6 +127,13 @@ export default class JitsiLocalTrack extends JitsiTrack {
|
127
|
127
|
// soon as it's called.
|
128
|
128
|
this._realDeviceId = this.deviceId === '' ? undefined : this.deviceId;
|
129
|
129
|
|
|
130
|
+ /**
|
|
131
|
+ * Set to <tt>true</tt> when there's ongoing "mute/unmute" operation in
|
|
132
|
+ * progress. Used by {@link LocalSdpMunger}.
|
|
133
|
+ * @type {boolean}
|
|
134
|
+ */
|
|
135
|
+ this.inMuteOrUnmuteProgress = true;
|
|
136
|
+
|
130
|
137
|
/**
|
131
|
138
|
* Indicates that we have called RTCUtils.stopMediaStream for the
|
132
|
139
|
* MediaStream related to this JitsiTrack object.
|
|
@@ -334,6 +341,7 @@ export default class JitsiLocalTrack extends JitsiTrack {
|
334
|
341
|
|
335
|
342
|
let promise = Promise.resolve();
|
336
|
343
|
|
|
344
|
+ this.inMuteOrUnmuteProgress = true;
|
337
|
345
|
this.dontFireRemoveEvent = false;
|
338
|
346
|
|
339
|
347
|
// A function that will print info about muted status transition
|
|
@@ -406,6 +414,13 @@ export default class JitsiLocalTrack extends JitsiTrack {
|
406
|
414
|
|
407
|
415
|
return promise
|
408
|
416
|
.then(() => this._sendMuteStatus(mute))
|
|
417
|
+ .then(() => {
|
|
418
|
+ this.inMuteOrUnmuteProgress = false;
|
|
419
|
+ }, error => {
|
|
420
|
+ this.inMuteOrUnmuteProgress = false;
|
|
421
|
+
|
|
422
|
+ throw error;
|
|
423
|
+ })
|
409
|
424
|
.then(() => {
|
410
|
425
|
this.emit(JitsiTrackEvents.TRACK_MUTE_CHANGED, this);
|
411
|
426
|
});
|