onComplete property

void Function(int id, int errorCode) onComplete
final

Background Music Ended

Called when the background music playback ends or an error occurs.

  • Param:
    • errCode:
      • 0: End of play
      • -4002: Decoding failure, such as audio file corruption, inaccessible network audio file server, etc.
    • id: music ID.

Implementation

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