add property isLocal to JitsiTrack
This commit is contained in:
parent
e3d0fac2fd
commit
e59196e824
|
@ -1341,6 +1341,7 @@ function JitsiLocalTrack(stream, videoType,
|
|||
this.dontFireRemoveEvent = false;
|
||||
this.resolution = resolution;
|
||||
this.startMuted = false;
|
||||
this.isLocal = true;
|
||||
var self = this;
|
||||
JitsiTrack.call(this, null, stream,
|
||||
function () {
|
||||
|
@ -1511,6 +1512,7 @@ function JitsiRemoteTrack(RTC, data, sid, ssrc) {
|
|||
this.videoType = data.videoType;
|
||||
this.ssrc = ssrc;
|
||||
this.muted = false;
|
||||
this.isLocal = false;
|
||||
if((this.type === JitsiTrack.AUDIO && data.audiomuted)
|
||||
|| (this.type === JitsiTrack.VIDEO && data.videomuted)) {
|
||||
this.muted = true;
|
||||
|
@ -1536,7 +1538,7 @@ JitsiRemoteTrack.prototype.setMute = function (value) {
|
|||
*/
|
||||
JitsiRemoteTrack.prototype.isMuted = function () {
|
||||
return this.muted;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the participant id which owns the track.
|
||||
|
@ -1551,7 +1553,7 @@ JitsiRemoteTrack.prototype.getParticipantId = function() {
|
|||
*/
|
||||
JitsiRemoteTrack.prototype.isLocal = function () {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
delete JitsiRemoteTrack.prototype.stop;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ function JitsiLocalTrack(stream, videoType,
|
|||
this.dontFireRemoveEvent = false;
|
||||
this.resolution = resolution;
|
||||
this.startMuted = false;
|
||||
this.isLocal = true;
|
||||
var self = this;
|
||||
JitsiTrack.call(this, null, stream,
|
||||
function () {
|
||||
|
|
|
@ -22,6 +22,7 @@ function JitsiRemoteTrack(RTC, data, sid, ssrc) {
|
|||
this.videoType = data.videoType;
|
||||
this.ssrc = ssrc;
|
||||
this.muted = false;
|
||||
this.isLocal = false;
|
||||
if((this.type === JitsiTrack.AUDIO && data.audiomuted)
|
||||
|| (this.type === JitsiTrack.VIDEO && data.videomuted)) {
|
||||
this.muted = true;
|
||||
|
@ -47,7 +48,7 @@ JitsiRemoteTrack.prototype.setMute = function (value) {
|
|||
*/
|
||||
JitsiRemoteTrack.prototype.isMuted = function () {
|
||||
return this.muted;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the participant id which owns the track.
|
||||
|
@ -62,7 +63,7 @@ JitsiRemoteTrack.prototype.getParticipantId = function() {
|
|||
*/
|
||||
JitsiRemoteTrack.prototype.isLocal = function () {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
delete JitsiRemoteTrack.prototype.stop;
|
||||
|
||||
|
|
Loading…
Reference in New Issue