|
@@ -191,6 +191,14 @@ JitsiConference.prototype.onMemberJoined = function (jid, email, nick) {
|
191
|
191
|
// this.participants[jid] = new JitsiParticipant();
|
192
|
192
|
}
|
193
|
193
|
|
|
194
|
+/**
|
|
195
|
+ * Returns the local user's ID
|
|
196
|
+ * @return {string} local user's ID
|
|
197
|
+ */
|
|
198
|
+JitsiConference.prototype.myUserId = function () {
|
|
199
|
+ return (this.room && this.room.myroomjid)? Strophe.getResourceFromJid(this.room.myroomjid) : null;
|
|
200
|
+}
|
|
201
|
+
|
194
|
202
|
/**
|
195
|
203
|
* Setups the listeners needed for the conference.
|
196
|
204
|
* @param conference the conference
|
|
@@ -221,7 +229,7 @@ function setupListeners(conference) {
|
221
|
229
|
// });
|
222
|
230
|
conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) {
|
223
|
231
|
if(conference.lastActiveSpeaker !== id && conference.room
|
224
|
|
- && conference.room.myroomjid !== id) {
|
|
232
|
+ && conference.myUserId() !== id) {
|
225
|
233
|
conference.lastActiveSpeaker = id;
|
226
|
234
|
conference.eventEmitter.emit(JitsiConferenceEvents.ACTIVE_SPEAKER_CHANGED, id);
|
227
|
235
|
}
|