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:
| Property | Type | Description |
|---|---|---|
| errMsg | string | Error description |
| errCode | number | Error code; see the table below for valid values |
errCode Valid Values:
| Value | Description |
|---|---|
| 10001 | Recording permission not granted |
| 10002 | Capture hardware unavailable (exclusively occupied by another process, etc.) |
| 10003 | Invalid configuration parameters (illegal sample rate / bit rate combination, etc.) |
| 10004 | Encoder initialization failed |
| 10005 | Recording file creation failed (invalid path / disk full) |
| 10006 | Hardware error during capture |
| 10007 | Recording terminated by a system interruption |
| 10009 | Internal unknown error |
errMsg Format:
All errMsg values follow a unified prefix format:
| errCode | errMsg |
|---|---|
| 10001 | operateRecorder:fail:permission denied |
| 10002 | operateRecorder:fail:device not available |
| 10003 | operateRecorder:fail:invalid config |
| 10004 | operateRecorder:fail:encoder init failed |
| 10005 | operateRecorder:fail:file create failed |
| 10006 | operateRecorder:fail:hardware error |
| 10007 | operateRecorder:fail:interrupted |
| 10009 | operateRecorder:fail:internal error |
