|
@@ -6,6 +6,8 @@ function JitsiParticipant(id, conference, displayName){
|
6
|
6
|
this._conference = conference;
|
7
|
7
|
this._displayName = displayName;
|
8
|
8
|
this._supportsDTMF = false;
|
|
9
|
+ this._tracks = [];
|
|
10
|
+ this._isModerator = false;
|
9
|
11
|
}
|
10
|
12
|
|
11
|
13
|
/**
|
|
@@ -19,7 +21,7 @@ JitsiParticipant.prototype.getConference = function() {
|
19
|
21
|
* @returns {Array.<JitsiTrack>} The list of media tracks for this participant.
|
20
|
22
|
*/
|
21
|
23
|
JitsiParticipant.prototype.getTracks = function() {
|
22
|
|
-
|
|
24
|
+ return this._tracks;
|
23
|
25
|
};
|
24
|
26
|
|
25
|
27
|
/**
|
|
@@ -40,6 +42,7 @@ JitsiParticipant.prototype.getDisplayName = function() {
|
40
|
42
|
* @returns {Boolean} Whether this participant is a moderator or not.
|
41
|
43
|
*/
|
42
|
44
|
JitsiParticipant.prototype.isModerator = function() {
|
|
45
|
+ return this._isModerator;
|
43
|
46
|
};
|
44
|
47
|
|
45
|
48
|
// Gets a link to an etherpad instance advertised by the participant?
|
|
@@ -52,14 +55,18 @@ JitsiParticipant.prototype.isModerator = function() {
|
52
|
55
|
* @returns {Boolean} Whether this participant has muted their audio.
|
53
|
56
|
*/
|
54
|
57
|
JitsiParticipant.prototype.isAudioMuted = function() {
|
55
|
|
-
|
|
58
|
+ return this.getTracks().reduce(function (track, isAudioMuted) {
|
|
59
|
+ return isAudioMuted && (track.isVideoTrack() || track.isMuted());
|
|
60
|
+ }, true);
|
56
|
61
|
};
|
57
|
62
|
|
58
|
63
|
/*
|
59
|
64
|
* @returns {Boolean} Whether this participant has muted their video.
|
60
|
65
|
*/
|
61
|
66
|
JitsiParticipant.prototype.isVideoMuted = function() {
|
62
|
|
-
|
|
67
|
+ return this.getTracks().reduce(function (track, isVideoMuted) {
|
|
68
|
+ return isVideoMuted && (track.isAudioTrack() || track.isMuted());
|
|
69
|
+ }, true);
|
63
|
70
|
};
|
64
|
71
|
|
65
|
72
|
/*
|
|
@@ -98,13 +105,6 @@ JitsiParticipant.prototype.isSipGateway = function() {
|
98
|
105
|
|
99
|
106
|
};
|
100
|
107
|
|
101
|
|
-/**
|
102
|
|
- * @returns {String} The ID for this participant's avatar.
|
103
|
|
- */
|
104
|
|
-JitsiParticipant.prototype.getAvatarId = function() {
|
105
|
|
-
|
106
|
|
-};
|
107
|
|
-
|
108
|
108
|
/**
|
109
|
109
|
* @returns {Boolean} Whether this participant is currently sharing their screen.
|
110
|
110
|
*/
|