Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

1.1 KB
Raw Blame
import { IStore } from '../app/types';
import i18next from '../base/i18n/i18next';
import { navigate }
    from '../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
import { screen } from '../mobile/navigation/routes';

import { INudge } from './actions.any';

/**
 * Returns the nudge notification payload for the given scenario.
 *
 * @param {string} scenario - Which service just started.
 * @param {Function} _dispatch - Unused on native (navigation handles the action).
 * @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: () => navigate(screen.conference.recording)
        };
    }

    return {
        descriptionText: `· ${i18next.t('transcribing.alsoRecord')}`,
        actionNameKey: 'dialog.startRecording',
        handler: () => navigate(screen.conference.recording)
    };
}