Function recordStartTimer

  • Starts a recording timer and manages its state.

    Parameters

    Returns Promise<void>

    A promise that resolves when the timer is started.

    This function initializes the recording start time and sets up an interval to update the timer every second. It also manages the state of the timer, including enabling and disabling pause/resume actions. The timer is stopped if the recording is paused, stopped, or if the room name is invalid.

    recordStartTimer({
    parameters: {
    recordStartTime: Date.now(),
    recordTimerInterval: null,
    isTimerRunning: false,
    canPauseResume: false,
    recordChangeSeconds: 10000,
    updateRecordStartTime: (time) => console.log("Start time:", time),
    updateRecordTimerInterval: (interval) => console.log("Timer interval:", interval),
    updateIsTimerRunning: (isRunning) => console.log("Is timer running:", isRunning),
    updateCanPauseResume: (canPause) => console.log("Can pause/resume:", canPause),
    getUpdatedAllParams: () => updatedParameters,
    },
    });