onStart property

void Function(int id, int errorCode) onStart
final

Background Music Started

Called after the background music starts.

  • Param:
    • errCode:
      • 0: Start playing successfully
      • -4001: Failed to open the file, such as invalid data found when processing input, ffmpeg protocol not found, etc.
      • -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 supports mp3, aac, m4a, wav, mp4, mkv.
    • id: music ID.

Implementation

final void Function(int id, int errorCode) onStart;