mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-22 06:57:48 +00:00
16 lines
611 B
TypeScript
16 lines
611 B
TypeScript
import { IReduxState } from '../app/types';
|
|
import { isLocalParticipantModerator } from '../base/participants/functions';
|
|
|
|
/**
|
|
* Checks whether the participant can start the transcription.
|
|
*
|
|
* @param {IReduxState} state - The redux state.
|
|
* @returns {boolean} - True if the participant can start the transcription.
|
|
*/
|
|
export function canStartTranscribing(state: IReduxState) {
|
|
const { transcription } = state['features/base/config'];
|
|
const { isTranscribing } = state['features/transcribing'];
|
|
|
|
return Boolean(transcription?.enabled && (isLocalParticipantModerator(state) || isTranscribing));
|
|
}
|