Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(transcriptions): Fixes transcription status, going offline. #2581

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions modules/xmpp/ChatRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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': {
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 12 additions & 0 deletions modules/xmpp/xmpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down