onLoadError property
Background Music Preload Error
- Param:
- id(int): music ID.
- errorCode(int):
- -4001: Failed to open the file, such as invalid data found when processing input, ffmpeg protocol not found, etc.
- -4002: Decoding failure, such as audio file corruption, inaccessible network audio file server, etc.
- -4003: The number of preloads exceeded the limit. Please call stopPlayMusic first to release the useless preload.
- -4005: Invalid path, please check whether the path you passed points to a legal music file.
- -4006: Invalid URL, please use a browser to check whether the URL address you passed in can download the desired music file.
- -4007: No audio stream, please confirm whether the file you passed is a legal audio file and whether the file is damaged.
- -4008: Unsupported format, please confirm whether the file format you passed is a supported file format.
The mobile version supports
mp3, aac, m4a, wav, ogg, mp4, mkv
, and the desktop version supportsmp3, aac, m4a, wav, mp4, mkv
.
Implementation
final void Function(int id, int errorCode) onLoadError;