mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(subtitles): Adds an option to automatically enable subtitles when transcriber is available.
This commit is contained in:
@@ -451,6 +451,10 @@ var config = {
|
||||
|
||||
// // Enables automatic turning on transcribing when recording is started
|
||||
// autoTranscribeOnRecord: false,
|
||||
|
||||
// // Enables automatic request of subtitles when transcriber is present in the meeting, uses the default
|
||||
// // language that is set
|
||||
// autoCaptionOnTranscribe: false,
|
||||
// },
|
||||
|
||||
// Misc
|
||||
|
||||
@@ -576,6 +576,7 @@ export interface IConfig {
|
||||
transcribeWithAppLanguage?: boolean;
|
||||
transcribingEnabled?: boolean;
|
||||
transcription?: {
|
||||
autoCaptionOnTranscribe?: boolean;
|
||||
autoTranscribeOnRecord?: boolean;
|
||||
enabled?: boolean;
|
||||
preferredLanguage?: string;
|
||||
|
||||
@@ -6,6 +6,7 @@ import { isJwtFeatureEnabled } from '../base/jwt/functions';
|
||||
import JitsiMeetJS from '../base/lib-jitsi-meet';
|
||||
import { isLocalParticipantModerator } from '../base/participants/functions';
|
||||
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
||||
import { TRANSCRIBER_JOINED } from '../transcribing/actionTypes';
|
||||
|
||||
import {
|
||||
SET_REQUESTING_SUBTITLES,
|
||||
@@ -80,6 +81,15 @@ MiddlewareRegistry.register(store => next => action => {
|
||||
_requestingSubtitlesChange(store, toggledValue, state._language);
|
||||
break;
|
||||
}
|
||||
case TRANSCRIBER_JOINED: {
|
||||
const { transcription } = store.getState()['features/base/config'];
|
||||
|
||||
if (transcription?.autoCaptionOnTranscribe) {
|
||||
store.dispatch(setRequestingSubtitles(true));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case SET_REQUESTING_SUBTITLES:
|
||||
_requestingSubtitlesChange(store, action.enabled, action.language);
|
||||
break;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { isLiveStreamingRunning, isRecordingRunning } from '../recording/functio
|
||||
import { isRecorderTranscriptionsRunning } from './functions';
|
||||
|
||||
/**
|
||||
* Listens for large video participant ID changes.
|
||||
* Listens for transcriber status change.
|
||||
*/
|
||||
StateListenerRegistry.register(
|
||||
/* selector */ isRecorderTranscriptionsRunning,
|
||||
|
||||
Reference in New Issue
Block a user