浏览代码

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

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

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

正在加载...
取消
保存