|
|
@@ -175,7 +175,7 @@ JitsiConference.prototype.setDisplayName = function(name) {
|
|
175
|
175
|
*/
|
|
176
|
176
|
JitsiConference.prototype.addTrack = function (track) {
|
|
177
|
177
|
this.rtc.addLocalStream(track);
|
|
178
|
|
- this.room.addStream(track.getOriginalStream, function () {});
|
|
|
178
|
+ this.room.addStream(track.getOriginalStream(), function () {});
|
|
179
|
179
|
}
|
|
180
|
180
|
|
|
181
|
181
|
/**
|
|
|
@@ -259,6 +259,7 @@ function setupListeners(conference) {
|
|
259
|
259
|
});
|
|
260
|
260
|
conference.rtc.addListener(StreamEventTypes.EVENT_TYPE_LOCAL_ENDED, function (stream) {
|
|
261
|
261
|
conference.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, stream);
|
|
|
262
|
+ conference.removeTrack(stream);
|
|
262
|
263
|
});
|
|
263
|
264
|
conference.rtc.addListener(StreamEventTypes.TRACK_MUTE_CHANGED, function (track) {
|
|
264
|
265
|
conference.eventEmitter.emit(JitsiConferenceEvents.TRACK_MUTE_CHANGED, track);
|
|
|
@@ -640,8 +641,9 @@ var LibJitsiMeet = {
|
|
640
|
641
|
}
|
|
641
|
642
|
};
|
|
642
|
643
|
|
|
|
644
|
+require("es6-promise").polyfill()
|
|
643
|
645
|
//Setups the promise object.
|
|
644
|
|
-window.Promise = window.Promise || require("es6-promise").polyfill();
|
|
|
646
|
+window.Promise = window.Promise || require("es6-promise").Promise;
|
|
645
|
647
|
|
|
646
|
648
|
module.exports = LibJitsiMeet;
|
|
647
|
649
|
|
|
|
@@ -2273,7 +2275,7 @@ var RTCUtils = {
|
|
2273
|
2275
|
AdapterJS.webRTCReady(function (isPlugin) {
|
|
2274
|
2276
|
|
|
2275
|
2277
|
self.peerconnection = RTCPeerConnection;
|
|
2276
|
|
- self.getUserMedia = getUserMedia;
|
|
|
2278
|
+ self.getUserMedia = window.getUserMedia;
|
|
2277
|
2279
|
self.enumerateDevices = enumerateDevicesThroughMediaStreamTrack;
|
|
2278
|
2280
|
self.attachMediaStream = function (elSel, stream) {
|
|
2279
|
2281
|
|
|
|
@@ -2437,7 +2439,7 @@ var RTCUtils = {
|
|
2437
|
2439
|
self.errorCallback(error, resolve, options);
|
|
2438
|
2440
|
},{micDeviceId: options.micDeviceId});
|
|
2439
|
2441
|
};
|
|
2440
|
|
- if((devices.indexOf('audio') === -1))
|
|
|
2442
|
+ if((options.devices.indexOf('audio') === -1))
|
|
2441
|
2443
|
obtainVideo(null)
|
|
2442
|
2444
|
else
|
|
2443
|
2445
|
obtainAudio();
|
|
|
@@ -6659,7 +6661,7 @@ JingleSessionPC.prototype.setRemoteDescription = function (elem, desctype) {
|
|
6659
|
6661
|
this.remoteSDP = new SDP('');
|
|
6660
|
6662
|
this.remoteSDP.fromJingle(elem);
|
|
6661
|
6663
|
this.readSsrcInfo($(elem).find(">content"));
|
|
6662
|
|
- if (this.peerconnection.remoteDescription !== null) {
|
|
|
6664
|
+ if (this.peerconnection.remoteDescription) {
|
|
6663
|
6665
|
logger.log('setRemoteDescription when remote description is not null, should be pranswer', this.peerconnection.remoteDescription);
|
|
6664
|
6666
|
if (this.peerconnection.remoteDescription.type == 'pranswer') {
|
|
6665
|
6667
|
var pranswer = new SDP(this.peerconnection.remoteDescription.sdp);
|
|
|
@@ -7485,6 +7487,8 @@ JingleSessionPC.onJingleFatalError = function (session, error)
|
|
7485
|
7487
|
JingleSessionPC.prototype.setLocalDescription = function () {
|
|
7486
|
7488
|
var self = this;
|
|
7487
|
7489
|
var newssrcs = [];
|
|
|
7490
|
+ if(!this.peerconnection.localDescription)
|
|
|
7491
|
+ return;
|
|
7488
|
7492
|
var session = transform.parse(this.peerconnection.localDescription.sdp);
|
|
7489
|
7493
|
session.media.forEach(function (media) {
|
|
7490
|
7494
|
|
|
|
@@ -7569,8 +7573,8 @@ JingleSessionPC.prototype.remoteStreamAdded = function (data, times) {
|
|
7569
|
7573
|
} else if (streamId && streamId.indexOf('mixedmslabel') === -1) {
|
|
7570
|
7574
|
// look only at a=ssrc: and _not_ at a=ssrc-group: lines
|
|
7571
|
7575
|
|
|
7572
|
|
- var ssrclines
|
|
7573
|
|
- = SDPUtil.find_lines(this.peerconnection.remoteDescription.sdp, 'a=ssrc:');
|
|
|
7576
|
+ var ssrclines = this.peerconnection.remoteDescription?
|
|
|
7577
|
+ SDPUtil.find_lines(this.peerconnection.remoteDescription.sdp, 'a=ssrc:') : [];
|
|
7574
|
7578
|
ssrclines = ssrclines.filter(function (line) {
|
|
7575
|
7579
|
// NOTE(gp) previously we filtered on the mslabel, but that property
|
|
7576
|
7580
|
// is not always present.
|
|
|
@@ -13466,7 +13470,7 @@ function getCallerInfo() {
|
|
13466
|
13470
|
};
|
|
13467
|
13471
|
//gets the part of the stack without the logger wrappers
|
|
13468
|
13472
|
var error = new Error();
|
|
13469
|
|
- var stack = error.stack.split("\n");
|
|
|
13473
|
+ var stack = error.stack? error.stack.split("\n") : [];
|
|
13470
|
13474
|
if(!stack || stack.length < 1) {
|
|
13471
|
13475
|
return callerInfo;
|
|
13472
|
13476
|
}
|