Fixes an issue when the local user is alone in the conference and he mutes his video.
This commit is contained in:
parent
fea751bbb7
commit
0e7e2da168
|
@ -13,12 +13,13 @@ function SessionBase(connection, sid){
|
||||||
|
|
||||||
SessionBase.prototype.modifySources = function (successCallback) {
|
SessionBase.prototype.modifySources = function (successCallback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.peerconnection.modifySources(function(){
|
if(this.peerconnection)
|
||||||
$(document).trigger('setLocalDescription.jingle', [self.sid]);
|
this.peerconnection.modifySources(function(){
|
||||||
if(successCallback) {
|
$(document).trigger('setLocalDescription.jingle', [self.sid]);
|
||||||
successCallback();
|
if(successCallback) {
|
||||||
}
|
successCallback();
|
||||||
});
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
SessionBase.prototype.addSource = function (elem, fromJid) {
|
SessionBase.prototype.addSource = function (elem, fromJid) {
|
||||||
|
@ -239,6 +240,7 @@ SessionBase.prototype.toggleVideoMute = function (callback) {
|
||||||
localVideo.getVideoTracks()[idx].enabled = !localVideo.getVideoTracks()[idx].enabled;
|
localVideo.getVideoTracks()[idx].enabled = !localVideo.getVideoTracks()[idx].enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.peerconnection.hardMuteVideo(!ismuted);
|
if(this.peerconnection)
|
||||||
|
this.peerconnection.hardMuteVideo(!ismuted);
|
||||||
this.modifySources(callback(!ismuted));
|
this.modifySources(callback(!ismuted));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue