InnerAudioContext.onError
JS
InnerAudioContext.onError(function callback)Listens for the audio playback error event.
Parameters
- function callback: Callback function for the audio playback error event.
Parameters of the callback function
- Object res: Returns information about the audio playback error.
res properties:
| Property | Type | Description |
|---|---|---|
| errMsg | string | Error message |
| errCode | number | Error code; see the table below for valid values |
Valid values of errCode:
| Value | Description |
|---|---|
| 10001 | System error |
| 10002 | Network error |
| 10003 | File error |
| 10004 | Format error |
| -1 | Unknown error |
