Ver código fonte

Fixes small issues from the previous commits + fixes IE 10 issues.

dev1
hristoterezov 10 anos atrás
pai
commit
b5ed190083
5 arquivos alterados com 22 adições e 15 exclusões
  1. 1
    1
      JitsiConference.js
  2. 2
    1
      JitsiMeetJS.js
  3. 12
    8
      lib-jitsi-meet.js
  4. 2
    2
      modules/RTC/RTCUtils.js
  5. 5
    3
      modules/xmpp/JingleSessionPC.js

+ 1
- 1
JitsiConference.js Ver arquivo

@@ -173,7 +173,7 @@ JitsiConference.prototype.setDisplayName = function(name) {
173 173
  */
174 174
 JitsiConference.prototype.addTrack = function (track) {
175 175
     this.rtc.addLocalStream(track);
176
-    this.room.addStream(track.getOriginalStream, function () {});
176
+    this.room.addStream(track.getOriginalStream(), function () {});
177 177
 }
178 178
 
179 179
 /**

+ 2
- 1
JitsiMeetJS.js Ver arquivo

@@ -52,7 +52,8 @@ var LibJitsiMeet = {
52 52
     }
53 53
 };
54 54
 
55
+require("es6-promise").polyfill()
55 56
 //Setups the promise object.
56
-window.Promise = window.Promise || require("es6-promise").polyfill();
57
+window.Promise = window.Promise || require("es6-promise").Promise;
57 58
 
58 59
 module.exports = LibJitsiMeet;

+ 12
- 8
lib-jitsi-meet.js Ver arquivo

@@ -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
     }

+ 2
- 2
modules/RTC/RTCUtils.js Ver arquivo

@@ -453,7 +453,7 @@ var RTCUtils = {
453 453
             AdapterJS.webRTCReady(function (isPlugin) {
454 454
 
455 455
                 self.peerconnection = RTCPeerConnection;
456
-                self.getUserMedia = getUserMedia;
456
+                self.getUserMedia = window.getUserMedia;
457 457
                 self.enumerateDevices = enumerateDevicesThroughMediaStreamTrack;
458 458
                 self.attachMediaStream = function (elSel, stream) {
459 459
 
@@ -617,7 +617,7 @@ var RTCUtils = {
617 617
                             self.errorCallback(error, resolve, options);
618 618
                         },{micDeviceId: options.micDeviceId});
619 619
                 };
620
-                if((devices.indexOf('audio') === -1))
620
+                if((options.devices.indexOf('audio') === -1))
621 621
                     obtainVideo(null)
622 622
                 else
623 623
                     obtainAudio();

+ 5
- 3
modules/xmpp/JingleSessionPC.js Ver arquivo

@@ -535,7 +535,7 @@ JingleSessionPC.prototype.setRemoteDescription = function (elem, desctype) {
535 535
     this.remoteSDP = new SDP('');
536 536
     this.remoteSDP.fromJingle(elem);
537 537
     this.readSsrcInfo($(elem).find(">content"));
538
-    if (this.peerconnection.remoteDescription !== null) {
538
+    if (this.peerconnection.remoteDescription) {
539 539
         logger.log('setRemoteDescription when remote description is not null, should be pranswer', this.peerconnection.remoteDescription);
540 540
         if (this.peerconnection.remoteDescription.type == 'pranswer') {
541 541
             var pranswer = new SDP(this.peerconnection.remoteDescription.sdp);
@@ -1361,6 +1361,8 @@ JingleSessionPC.onJingleFatalError = function (session, error)
1361 1361
 JingleSessionPC.prototype.setLocalDescription = function () {
1362 1362
     var self = this;
1363 1363
     var newssrcs = [];
1364
+    if(!this.peerconnection.localDescription)
1365
+        return;
1364 1366
     var session = transform.parse(this.peerconnection.localDescription.sdp);
1365 1367
     session.media.forEach(function (media) {
1366 1368
 
@@ -1445,8 +1447,8 @@ JingleSessionPC.prototype.remoteStreamAdded = function (data, times) {
1445 1447
     } else if (streamId && streamId.indexOf('mixedmslabel') === -1) {
1446 1448
         // look only at a=ssrc: and _not_ at a=ssrc-group: lines
1447 1449
 
1448
-        var ssrclines
1449
-            = SDPUtil.find_lines(this.peerconnection.remoteDescription.sdp, 'a=ssrc:');
1450
+        var ssrclines = this.peerconnection.remoteDescription?
1451
+            SDPUtil.find_lines(this.peerconnection.remoteDescription.sdp, 'a=ssrc:') : [];
1450 1452
         ssrclines = ssrclines.filter(function (line) {
1451 1453
             // NOTE(gp) previously we filtered on the mslabel, but that property
1452 1454
             // is not always present.

Carregando…
Cancelar
Salvar