Skip to content

Commit

Permalink
feat(subtitles) drop disableStartForAll config option
Browse files Browse the repository at this point in the history
It wasn't related to transcriptions but to subtitles, really.

Since we are not going to show subtitles just because transcriptions are
enabled, this setting no longer makes sense.
  • Loading branch information
saghul committed Jan 29, 2024
1 parent cfbcfdc commit 4ff2422
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
3 changes: 0 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,6 @@ var config = {
// // ./src/react/features/transcribing/transcriber-langs.json.
// preferredLanguage: 'en-US',

// // Disable start transcription for all participants.
// disableStartForAll: false,

// // Enables automatic turning on transcribing when recording is started
// autoTranscribeOnRecord: false,
// },
Expand Down
1 change: 0 additions & 1 deletion react/features/base/config/configType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ export interface IConfig {
transcribingEnabled?: boolean;
transcription?: {
autoTranscribeOnRecord?: boolean;
disableStartForAll?: boolean;
enabled?: boolean;
preferredLanguage?: string;
translationLanguages?: Array<string>;
Expand Down
21 changes: 2 additions & 19 deletions react/features/transcribing/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
PARTICIPANT_UPDATED
} from '../base/participants/actionTypes';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { toggleRequestingSubtitles } from '../subtitles/actions.any';

import {
_TRANSCRIBER_JOINED,
Expand Down Expand Up @@ -32,30 +31,14 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
} = getState()['features/transcribing'];

switch (action.type) {
case _TRANSCRIBER_JOINED: {
case _TRANSCRIBER_JOINED:
notifyTranscribingStatusChanged(true);

const state = getState();
const { transcription } = state['features/base/config'];
const { _requestingSubtitles } = state['features/subtitles'];

if (!_requestingSubtitles && !transcription?.disableStartForAll) {
dispatch(toggleRequestingSubtitles());
}
break;
}
case _TRANSCRIBER_LEFT: {
case _TRANSCRIBER_LEFT:
notifyTranscribingStatusChanged(false);

const state = getState();
const { transcription } = state['features/base/config'];
const { _requestingSubtitles } = state['features/subtitles'];

if (_requestingSubtitles && !transcription?.disableStartForAll) {
dispatch(toggleRequestingSubtitles());
}
break;
}
case HIDDEN_PARTICIPANT_JOINED:
if (action.displayName === TRANSCRIBER_DISPLAY_NAME) {
dispatch(transcriberJoined(action.id));
Expand Down

0 comments on commit 4ff2422

Please sign in to comment.