Files
upstream-jitsi-meet/react/features/recording/nudge.web.ts
upstream-mirror 1d2bfcac0c
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s
snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
2026-09-15 15:56:32 +05:00

35 lines
1.3 KiB
TypeScript

import { IStore } from '../app/types';
import { openDialog } from '../base/dialog/actions';
import i18next from '../base/i18n/i18next';
import { INudge } from './actions.any';
import RecordingTranscriptionDialog from './components/Recording/web/RecordingTranscriptionDialog';
/**
* Returns the nudge notification payload for the given scenario.
*
* @param {string} scenario - Which service just started.
* @param {Function} dispatch - The Redux dispatch function.
* @returns {Object}
*/
export function getNudge(scenario: 'recording' | 'transcription', dispatch: IStore['dispatch']): INudge {
if (scenario === 'recording') {
return {
descriptionText: `· ${i18next.t('recording.alsoTranscribe')}`,
actionNameKey: 'dialog.startTranscribing',
handler: () => dispatch(openDialog('RecordingTranscriptionDialog', RecordingTranscriptionDialog, {
recordAudioAndVideo: false
}))
};
}
return {
descriptionText: `· ${i18next.t('transcribing.alsoRecord')}`,
actionNameKey: 'dialog.startRecording',
// recordAudioAndVideo defaults to true, which already puts the focus on the recording
// section, so nothing extra needs to be passed here.
handler: () => dispatch(openDialog('RecordingTranscriptionDialog', RecordingTranscriptionDialog))
};
}