Browse Source

add property isLocal to JitsiTrack

master
isymchych 10 years ago
parent
commit
1f69ab8d18
3 changed files with 8 additions and 4 deletions
  1. 4
    2
      lib-jitsi-meet.js
  2. 1
    0
      modules/RTC/JitsiLocalTrack.js
  3. 3
    2
      modules/RTC/JitsiRemoteTrack.js

+ 4
- 2
lib-jitsi-meet.js View File

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

+ 1
- 0
modules/RTC/JitsiLocalTrack.js View File

@@ -14,6 +14,7 @@ function JitsiLocalTrack(stream, videoType,
14 14
     this.dontFireRemoveEvent = false;
15 15
     this.resolution = resolution;
16 16
     this.startMuted = false;
17
+    this.isLocal = true;
17 18
     var self = this;
18 19
     JitsiTrack.call(this, null, stream,
19 20
         function () {

+ 3
- 2
modules/RTC/JitsiRemoteTrack.js View File

@@ -22,6 +22,7 @@ function JitsiRemoteTrack(RTC, data, sid, ssrc) {
22 22
     this.videoType = data.videoType;
23 23
     this.ssrc = ssrc;
24 24
     this.muted = false;
25
+    this.isLocal = false;
25 26
     if((this.type === JitsiTrack.AUDIO && data.audiomuted)
26 27
       || (this.type === JitsiTrack.VIDEO && data.videomuted)) {
27 28
         this.muted = true;
@@ -47,7 +48,7 @@ JitsiRemoteTrack.prototype.setMute = function (value) {
47 48
  */
48 49
 JitsiRemoteTrack.prototype.isMuted = function () {
49 50
     return this.muted;
50
-}
51
+};
51 52
 
52 53
 /**
53 54
  * Returns the participant id which owns the track.
@@ -62,7 +63,7 @@ JitsiRemoteTrack.prototype.getParticipantId = function() {
62 63
  */
63 64
 JitsiRemoteTrack.prototype.isLocal = function () {
64 65
     return false;
65
-}
66
+};
66 67
 
67 68
 delete JitsiRemoteTrack.prototype.stop;
68 69
 

Loading…
Cancel
Save