Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes an issue when the local user is alone in the conference and he mutes his video.

hristoterezov0e7e2da1688b
diff --git a/libs/strophe/strophe.jingle.sessionbase.js b/libs/strophe/strophe.jingle.sessionbase.js
index 31035047b3..b2dcb4bf8f 100644
--- a/libs/strophe/strophe.jingle.sessionbase.js
+++ b/libs/strophe/strophe.jingle.sessionbase.js
@@ -13,12 +13,13 @@ function SessionBase(connection, sid){
SessionBase.prototype.modifySources = function (successCallback) {
var self = this;
- this.peerconnection.modifySources(function(){
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- if(successCallback) {
- successCallback();
- }
- });
+ if(this.peerconnection)
+ this.peerconnection.modifySources(function(){
+ $(document).trigger('setLocalDescription.jingle', [self.sid]);
+ if(successCallback) {
+ successCallback();
+ }
+ });
};
SessionBase.prototype.addSource = function (elem, fromJid) {
@@ -239,6 +240,7 @@ SessionBase.prototype.toggleVideoMute = function (callback) {
localVideo.getVideoTracks()[idx].enabled = !localVideo.getVideoTracks()[idx].enabled;
}
- this.peerconnection.hardMuteVideo(!ismuted);
+ if(this.peerconnection)
+ this.peerconnection.hardMuteVideo(!ismuted);
this.modifySources(callback(!ismuted));
};