MediaSFU React Native
    Preparing search index...

    Function checkPauseState

    • Checks if the recording can be paused based on the current pause count and the allowed pause limits.

      Parameters

      • options: CheckPauseStateOptions

        The options for checking the pause state.

        • recordingMediaOptions: string
        • recordingVideoPausesLimit: number
        • recordingAudioPausesLimit: number
        • pauseRecordCount: number
        • OptionalshowAlert?: ShowAlert

      Returns Promise<boolean>

      • A promise that resolves to true if the recording can be paused, otherwise false.
      const canPause = await checkPauseState({
      recordingMediaOptions: "audio",
      recordingVideoPausesLimit: 3,
      recordingAudioPausesLimit: 5,
      pauseRecordCount: 4,
      showAlert: ({ message, type, duration }) => console.log(message),
      });
      console.log(canPause); // true if pauseRecordCount is below the limit, false if limit reached