You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.native.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // @flow
  2. import JitsiMeetJS from '../base/lib-jitsi-meet';
  3. import { showNotification } from '../notifications';
  4. export * from './actions.any';
  5. /**
  6. * Signals that a started recording notification should be shown on the
  7. * screen for a given period.
  8. *
  9. * @param {string} streamType - The type of the stream ({@code file} or
  10. * {@code stream}).
  11. * @returns {showNotification}
  12. */
  13. export function showRecordingLimitNotification(streamType: string) {
  14. return (dispatch: Function, getState: Function) => {
  15. const isLiveStreaming = streamType === JitsiMeetJS.constants.recording.mode.STREAM;
  16. let descriptionKey, titleKey;
  17. if (isLiveStreaming) {
  18. descriptionKey = 'liveStreaming.limitNotificationDescriptionNative';
  19. titleKey = 'dialog.liveStreaming';
  20. } else {
  21. descriptionKey = 'recording.limitNotificationDescriptionNative';
  22. titleKey = 'dialog.recording';
  23. }
  24. const { recordingLimit = {} } = getState()['features/base/config'];
  25. const { limit, appName } = recordingLimit;
  26. return dispatch(showNotification({
  27. descriptionArguments: {
  28. limit,
  29. app: appName
  30. },
  31. descriptionKey,
  32. titleKey,
  33. maxLines: 2
  34. }, 10000));
  35. };
  36. }