feat(API): add dominant speaker changed event
Fixes: https://github.com/jitsi/jitsi-meet/issues/4049
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
c3e52f32f9
commit
b658f20a30
@@ -709,6 +709,20 @@ class API {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application (if API is enabled) that the dominant speaker
|
||||
* has been turned on/off.
|
||||
*
|
||||
* @param {string} id - Id of the dominant participant.
|
||||
* @returns {void}
|
||||
*/
|
||||
notifyDominantSpeakerChanged(id: string) {
|
||||
this._sendEvent({
|
||||
name: 'dominant-speaker-changed',
|
||||
id
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application (if API is enabled) that the conference
|
||||
* changed their subject.
|
||||
|
||||
Vendored
+9
-2
@@ -73,6 +73,7 @@ const events = {
|
||||
'video-availability-changed': 'videoAvailabilityChanged',
|
||||
'video-mute-status-changed': 'videoMuteStatusChanged',
|
||||
'screen-sharing-status-changed': 'screenSharingStatusChanged',
|
||||
'dominant-speaker-changed': 'dominantSpeakerChanged',
|
||||
'subject-change': 'subjectChange',
|
||||
'suspend-detected': 'suspendDetected',
|
||||
'tile-view-changed': 'tileViewChanged'
|
||||
@@ -521,13 +522,13 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
* {{
|
||||
* jid: jid //the jid of the participant
|
||||
* }}
|
||||
* {@code video-conference-joined} - receives event notifications about the
|
||||
* {@code videoConferenceJoined} - receives event notifications about the
|
||||
* local user has successfully joined the video conference.
|
||||
* The listener will receive object with the following structure:
|
||||
* {{
|
||||
* roomName: room //the room name of the conference
|
||||
* }}
|
||||
* {@code video-conference-left} - receives event notifications about the
|
||||
* {@code videoConferenceLeft} - receives event notifications about the
|
||||
* local user has left the video conference.
|
||||
* The listener will receive object with the following structure:
|
||||
* {{
|
||||
@@ -539,6 +540,12 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
* {{
|
||||
* on: on //whether screen sharing is on
|
||||
* }}
|
||||
* {@code dominantSpeakerChanged} - receives event notifications about
|
||||
* change in the dominant speaker.
|
||||
* The listener will receive object with the following structure:
|
||||
* {{
|
||||
* id: participantId //participantId of the new dominant speaker
|
||||
* }}
|
||||
* {@code suspendDetected} - receives event notifications about detecting suspend event in host computer.
|
||||
* {@code readyToClose} - all hangup operations are completed and Jitsi Meet
|
||||
* is ready to be disposed.
|
||||
|
||||
Reference in New Issue
Block a user