2020-05-28 22:42:02 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import JitsiMeetJS from '../base/lib-jitsi-meet';
|
2021-11-24 11:05:27 +00:00
|
|
|
import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../notifications';
|
2020-05-28 22:42:02 +00:00
|
|
|
|
|
|
|
import { RecordingLimitNotificationDescription } from './components';
|
|
|
|
|
|
|
|
export * from './actions.any';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Signals that a started recording notification should be shown on the
|
|
|
|
* screen for a given period.
|
|
|
|
*
|
|
|
|
* @param {string} streamType - The type of the stream ({@code file} or
|
|
|
|
* {@code stream}).
|
|
|
|
* @returns {showNotification}
|
|
|
|
*/
|
|
|
|
export function showRecordingLimitNotification(streamType: string) {
|
|
|
|
const isLiveStreaming = streamType === JitsiMeetJS.constants.recording.mode.STREAM;
|
|
|
|
|
|
|
|
return showNotification({
|
|
|
|
description: <RecordingLimitNotificationDescription isLiveStreaming = { isLiveStreaming } />,
|
|
|
|
titleKey: isLiveStreaming ? 'dialog.liveStreaming' : 'dialog.recording'
|
2021-11-24 11:05:27 +00:00
|
|
|
}, NOTIFICATION_TIMEOUT_TYPE.LONG);
|
2020-05-28 22:42:02 +00:00
|
|
|
}
|