瀏覽代碼

updated library

j8
isymchych 9 年之前
父節點
當前提交
2af591f6d9
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. 2
    2
      app.js
  2. 4
    2
      lib-jitsi-meet.js

+ 2
- 2
app.js 查看文件

244
 
244
 
245
 
245
 
246
     room.on(ConferenceEvents.TRACK_ADDED, function (track) {
246
     room.on(ConferenceEvents.TRACK_ADDED, function (track) {
247
-        if (!track.getParticipantId) { // skip local tracks
247
+        if (track.isLocal) { // skip local tracks
248
             return;
248
             return;
249
         }
249
         }
250
         console.error(
250
         console.error(
253
         APP.UI.addRemoteStream(track);
253
         APP.UI.addRemoteStream(track);
254
     });
254
     });
255
     room.on(ConferenceEvents.TRACK_REMOVED, function (track) {
255
     room.on(ConferenceEvents.TRACK_REMOVED, function (track) {
256
-        if (!track.getParticipantId) { // skip local tracks
256
+        if (track.isLocal) { // skip local tracks
257
             return;
257
             return;
258
         }
258
         }
259
 
259
 

+ 4
- 2
lib-jitsi-meet.js 查看文件

1341
     this.dontFireRemoveEvent = false;
1341
     this.dontFireRemoveEvent = false;
1342
     this.resolution = resolution;
1342
     this.resolution = resolution;
1343
     this.startMuted = false;
1343
     this.startMuted = false;
1344
+    this.isLocal = true;
1344
     var self = this;
1345
     var self = this;
1345
     JitsiTrack.call(this, null, stream,
1346
     JitsiTrack.call(this, null, stream,
1346
         function () {
1347
         function () {
1511
     this.videoType = data.videoType;
1512
     this.videoType = data.videoType;
1512
     this.ssrc = ssrc;
1513
     this.ssrc = ssrc;
1513
     this.muted = false;
1514
     this.muted = false;
1515
+    this.isLocal = false;
1514
     if((this.type === JitsiTrack.AUDIO && data.audiomuted)
1516
     if((this.type === JitsiTrack.AUDIO && data.audiomuted)
1515
       || (this.type === JitsiTrack.VIDEO && data.videomuted)) {
1517
       || (this.type === JitsiTrack.VIDEO && data.videomuted)) {
1516
         this.muted = true;
1518
         this.muted = true;
1536
  */
1538
  */
1537
 JitsiRemoteTrack.prototype.isMuted = function () {
1539
 JitsiRemoteTrack.prototype.isMuted = function () {
1538
     return this.muted;
1540
     return this.muted;
1539
-}
1541
+};
1540
 
1542
 
1541
 /**
1543
 /**
1542
  * Returns the participant id which owns the track.
1544
  * Returns the participant id which owns the track.
1551
  */
1553
  */
1552
 JitsiRemoteTrack.prototype.isLocal = function () {
1554
 JitsiRemoteTrack.prototype.isLocal = function () {
1553
     return false;
1555
     return false;
1554
-}
1556
+};
1555
 
1557
 
1556
 delete JitsiRemoteTrack.prototype.stop;
1558
 delete JitsiRemoteTrack.prototype.stop;
1557
 
1559
 

Loading…
取消
儲存