|
|
@@ -13,12 +13,13 @@ function SessionBase(connection, sid){
|
|
13
|
13
|
|
|
14
|
14
|
SessionBase.prototype.modifySources = function (successCallback) {
|
|
15
|
15
|
var self = this;
|
|
16
|
|
- this.peerconnection.modifySources(function(){
|
|
17
|
|
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
|
|
18
|
|
- if(successCallback) {
|
|
19
|
|
- successCallback();
|
|
20
|
|
- }
|
|
21
|
|
- });
|
|
|
16
|
+ if(this.peerconnection)
|
|
|
17
|
+ this.peerconnection.modifySources(function(){
|
|
|
18
|
+ $(document).trigger('setLocalDescription.jingle', [self.sid]);
|
|
|
19
|
+ if(successCallback) {
|
|
|
20
|
+ successCallback();
|
|
|
21
|
+ }
|
|
|
22
|
+ });
|
|
22
|
23
|
};
|
|
23
|
24
|
|
|
24
|
25
|
SessionBase.prototype.addSource = function (elem, fromJid) {
|
|
|
@@ -239,6 +240,7 @@ SessionBase.prototype.toggleVideoMute = function (callback) {
|
|
239
|
240
|
localVideo.getVideoTracks()[idx].enabled = !localVideo.getVideoTracks()[idx].enabled;
|
|
240
|
241
|
}
|
|
241
|
242
|
|
|
242
|
|
- this.peerconnection.hardMuteVideo(!ismuted);
|
|
|
243
|
+ if(this.peerconnection)
|
|
|
244
|
+ this.peerconnection.hardMuteVideo(!ismuted);
|
|
243
|
245
|
this.modifySources(callback(!ismuted));
|
|
244
|
246
|
};
|