Renames all active speaker references to be called dominant speaker.

This commit is contained in:
damencho 2016-01-11 18:11:40 -06:00
parent 2dc3cfbd2b
commit 18698f9ce2
5 changed files with 15 additions and 15 deletions

View File

@ -39,7 +39,7 @@ function JitsiConference(options) {
this.statistics = new Statistics();
setupListeners(this);
this.participants = {};
this.lastActiveSpeaker = null;
this.lastDominantSpeaker = null;
this.dtmfManager = null;
this.somebodySupportsDTMF = false;
this.authEnabled = false;
@ -743,9 +743,9 @@ function setupListeners(conference) {
});
conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) {
if(conference.lastActiveSpeaker !== id && conference.room) {
conference.lastActiveSpeaker = id;
conference.eventEmitter.emit(JitsiConferenceEvents.ACTIVE_SPEAKER_CHANGED, id);
if(conference.lastDominantSpeaker !== id && conference.room) {
conference.lastDominantSpeaker = id;
conference.eventEmitter.emit(JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED, id);
}
});

View File

@ -12,9 +12,9 @@ var JitsiConferenceEvents = {
*/
TRACK_REMOVED: "conference.trackRemoved",
/**
* The active speaker was changed.
* The dominant speaker was changed.
*/
ACTIVE_SPEAKER_CHANGED: "conference.activeSpeaker",
DOMINANT_SPEAKER_CHANGED: "conference.dominantSpeaker",
/**
* A new user joinned the conference.
*/

View File

@ -77,7 +77,7 @@ JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.ERROR);
- TRACK_ADDED - stream received. (parameters - JitsiTrack)
- TRACK_REMOVED - stream removed. (parameters - JitsiTrack)
- TRACK_MUTE_CHANGED - JitsiTrack was muted or unmuted. (parameters - JitsiTrack)
- ACTIVE_SPEAKER_CHANGED - the active speaker is changed. (parameters - id(string))
- DOMINANT_SPEAKER_CHANGED - the dominant speaker is changed. (parameters - id(string))
- USER_JOINED - new user joined a conference. (parameters - id(string), user(JitsiParticipant))
- USER_LEFT - a participant left conference. (parameters - id(string), user(JitsiParticipant))
- MESSAGE_RECEIVED - new text message received. (parameters - id(string), text(string), ts(number))

View File

@ -41,7 +41,7 @@ function JitsiConference(options) {
this.statistics = new Statistics();
setupListeners(this);
this.participants = {};
this.lastActiveSpeaker = null;
this.lastDominantSpeaker = null;
this.dtmfManager = null;
this.somebodySupportsDTMF = false;
this.authEnabled = false;
@ -745,9 +745,9 @@ function setupListeners(conference) {
});
conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) {
if(conference.lastActiveSpeaker !== id && conference.room) {
conference.lastActiveSpeaker = id;
conference.eventEmitter.emit(JitsiConferenceEvents.ACTIVE_SPEAKER_CHANGED, id);
if(conference.lastDominantSpeaker !== id && conference.room) {
conference.lastDominantSpeaker = id;
conference.eventEmitter.emit(JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED, id);
}
});
@ -842,9 +842,9 @@ var JitsiConferenceEvents = {
*/
TRACK_REMOVED: "conference.trackRemoved",
/**
* The active speaker was changed.
* The dominant speaker was changed.
*/
ACTIVE_SPEAKER_CHANGED: "conference.activeSpeaker",
DOMINANT_SPEAKER_CHANGED: "conference.dominantSpeaker",
/**
* A new user joinned the conference.
*/

File diff suppressed because one or more lines are too long