diff --git a/modules/xmpp/ChatRoom.js b/modules/xmpp/ChatRoom.js index 7142495f87..480fa63883 100644 --- a/modules/xmpp/ChatRoom.js +++ b/modules/xmpp/ChatRoom.js @@ -21,6 +21,7 @@ import BreakoutRooms from './BreakoutRooms'; import Lobby from './Lobby'; import RoomMetadata from './RoomMetadata'; import XmppConnection from './XmppConnection'; +import { FEATURE_TRANSCRIBER } from './xmpp'; const logger = getLogger(__filename); @@ -833,15 +834,16 @@ export default class ChatRoom extends Listenable { const { status } = attributes; - if (status && status !== this.transcriptionStatus) { + if (status && status !== this.transcriptionStatus + && member.isHiddenDomain && member.features.has(FEATURE_TRANSCRIBER)) { this.transcriptionStatus = status; this.eventEmitter.emit( XMPPEvents.TRANSCRIPTION_STATUS_CHANGED, - status + status, + Strophe.getResourceFromJid(from) ); } - break; } case 'call-control': { @@ -1138,6 +1140,18 @@ export default class ChatRoom extends Listenable { // In this case we *do* fire MUC_MEMBER_LEFT for the focus? this.eventEmitter.emit(XMPPEvents.MUC_MEMBER_LEFT, from, reason); + + if (member && member.isHiddenDomain && member.features.has(FEATURE_TRANSCRIBER) + && this.transcriptionStatus !== JitsiTranscriptionStatus.OFF) { + this.transcriptionStatus = JitsiTranscriptionStatus.OFF; + this.eventEmitter.emit( + XMPPEvents.TRANSCRIPTION_STATUS_CHANGED, + this.transcriptionStatus, + Strophe.getResourceFromJid(from), + true /* exited abruptly */ + ); + } + if (member?.isFocus) { logger.info('Focus has left the room - leaving conference'); this.eventEmitter.emit(XMPPEvents.FOCUS_LEFT); diff --git a/modules/xmpp/xmpp.js b/modules/xmpp/xmpp.js index a84febca6a..ce2ef71310 100644 --- a/modules/xmpp/xmpp.js +++ b/modules/xmpp/xmpp.js @@ -103,6 +103,18 @@ export const JITSI_MEET_MUC_TYPE = 'type'; */ export const FEATURE_JIGASI = 'http://jitsi.org/protocol/jigasi'; +/** + * The feature used by jibri participants. + * @type {string} + */ +export const FEATURE_JIBRI = 'http://jitsi.org/protocol/jibri'; + +/** + * The feature used by jigasi transcriber participants. + * @type {string} + */ +export const FEATURE_TRANSCRIBER = 'http://jitsi.org/protocol/transcriber'; + /** * The feature used by the lib to mark support for e2ee. We use the feature by putting it in the presence * to avoid additional signaling (disco-info).