Fixes JS errors when muting.
This commit is contained in:
parent
dfc82e5197
commit
8cabf2b003
|
@ -742,7 +742,7 @@ JitsiLocalTrack.prototype._setMute = function (mute) {
|
|||
// FIXME FF does not support 'removeStream' method used to mute
|
||||
RTCBrowserType.isFirefox()) {
|
||||
|
||||
var tracks = this.getTracks();
|
||||
var tracks = this._getTracks();
|
||||
for (var idx = 0; idx < tracks.length; idx++) {
|
||||
tracks[idx].enabled = !mute;
|
||||
}
|
||||
|
@ -4316,7 +4316,8 @@ ChatRoom.prototype.setVideoMute = function (mute, callback, options) {
|
|||
var self = this;
|
||||
var localCallback = function (mute) {
|
||||
self.sendVideoInfoPresence(mute);
|
||||
return callback(mute);
|
||||
if(callback)
|
||||
callback(mute)
|
||||
};
|
||||
|
||||
if(this.session)
|
||||
|
@ -4355,7 +4356,8 @@ ChatRoom.prototype.sendAudioInfoPresence = function(mute, callback) {
|
|||
if(this.connection) {
|
||||
this.sendPresence();
|
||||
}
|
||||
callback();
|
||||
if(callback)
|
||||
callback();
|
||||
};
|
||||
|
||||
ChatRoom.prototype.addVideoInfoToPresence = function (mute) {
|
||||
|
|
|
@ -56,7 +56,7 @@ JitsiLocalTrack.prototype._setMute = function (mute) {
|
|||
// FIXME FF does not support 'removeStream' method used to mute
|
||||
RTCBrowserType.isFirefox()) {
|
||||
|
||||
var tracks = this.getTracks();
|
||||
var tracks = this._getTracks();
|
||||
for (var idx = 0; idx < tracks.length; idx++) {
|
||||
tracks[idx].enabled = !mute;
|
||||
}
|
||||
|
|
|
@ -501,7 +501,8 @@ ChatRoom.prototype.setVideoMute = function (mute, callback, options) {
|
|||
var self = this;
|
||||
var localCallback = function (mute) {
|
||||
self.sendVideoInfoPresence(mute);
|
||||
return callback(mute);
|
||||
if(callback)
|
||||
callback(mute)
|
||||
};
|
||||
|
||||
if(this.session)
|
||||
|
@ -540,7 +541,8 @@ ChatRoom.prototype.sendAudioInfoPresence = function(mute, callback) {
|
|||
if(this.connection) {
|
||||
this.sendPresence();
|
||||
}
|
||||
callback();
|
||||
if(callback)
|
||||
callback();
|
||||
};
|
||||
|
||||
ChatRoom.prototype.addVideoInfoToPresence = function (mute) {
|
||||
|
|
Loading…
Reference in New Issue