Service for handling recording notices, managing recording states, and updating related parameters.
RecordingNotice
Provides methods to handle the recording notice state, manage user recording parameters, and play appropriate sounds for different states.
The options for recording notices:
state
pause
stop
userRecordingParam
pauseCount
timeDone
parameters
updateRecordElapsedTime
updateShowRecordButtons
updateRecordState
red
green
yellow
updatePauseRecordCount
updateRecordStarted
updateRecordPaused
updateCanLaunchRecord
Resolves when the recording state and parameters have been updated.
const options = { state: 'pause', userRecordingParam: { mainSpecs: { mediaOptions: 'audio', ... } }, pauseCount: 3, timeDone: 3600, parameters: { updateRecordStarted: (started) => console.log(`Recording started: ${started}`), updateRecordPaused: (paused) => console.log(`Recording paused: ${paused}`), // Define other update functions similarly }};await recordingNoticeService.RecordingNotice(options); Copy
const options = { state: 'pause', userRecordingParam: { mainSpecs: { mediaOptions: 'audio', ... } }, pauseCount: 3, timeDone: 3600, parameters: { updateRecordStarted: (started) => console.log(`Recording started: ${started}`), updateRecordPaused: (paused) => console.log(`Recording paused: ${paused}`), // Define other update functions similarly }};await recordingNoticeService.RecordingNotice(options);
Handles the recording notice state and updates various recording parameters accordingly.
The options object.
A promise that resolves when the recording notice handling is complete.
Throws an error if handling the recording state and status fails.
Service for handling recording notices, managing recording states, and updating related parameters.
Name
RecordingNotice
Description
Provides methods to handle the recording notice state, manage user recording parameters, and play appropriate sounds for different states.
Method
RecordingNotice
Param: options
The options for recording notices:
state
{string}: The current recording state (pause
,stop
, etc.).userRecordingParam
{UserRecordingParams | null}: The user recording parameters (if available).pauseCount
{number}: The number of pauses in the recording.timeDone
{number}: The total recording time completed.parameters
{RecordingNoticeParameters}: Functions and properties to update recording details.updateRecordElapsedTime
{Function}: Updates elapsed recording time.updateShowRecordButtons
{Function}: Toggles record button visibility.updateRecordState
{Function}: Sets the record state (e.g.,red
,green
,yellow
).updatePauseRecordCount
{Function}: Sets the pause record count.updateRecordStarted
,updateRecordPaused
,updateCanLaunchRecord
, etc.: Other update functions to control recording settings and states.Returns
Resolves when the recording state and parameters have been updated.
Example