Skip to content

RecorderManager.onError ​

JS
RecorderManager.onError(function callback)

Listens for the recording error event

Parameters

  • function callback: the callback function for the recording error event

callback Parameters

  • Object res: error information

res Properties:

PropertyTypeDescription
errMsgstringError description
errCodenumberError code; see the table below for valid values

errCode Valid Values:

ValueDescription
10001Recording permission not granted
10002Capture hardware unavailable (exclusively occupied by another process, etc.)
10003Invalid configuration parameters (illegal sample rate / bit rate combination, etc.)
10004Encoder initialization failed
10005Recording file creation failed (invalid path / disk full)
10006Hardware error during capture
10007Recording terminated by a system interruption
10009Internal unknown error

errMsg Format:

All errMsg values follow a unified prefix format:

errCodeerrMsg
10001operateRecorder:fail:permission denied
10002operateRecorder:fail:device not available
10003operateRecorder:fail:invalid config
10004operateRecorder:fail:encoder init failed
10005operateRecorder:fail:file create failed
10006operateRecorder:fail:hardware error
10007operateRecorder:fail:interrupted
10009operateRecorder:fail:internal error