setMusicObserver abstract method

void setMusicObserver(
  1. int musicId,
  2. TXMusicPlayObserver? observer
)

Setting the Background Music Callback

  • Before playing background music, please use this API to set the music callback, which can inform you of the playback progress.

  • Parameters:

Note:

  1. If the ID does not need to be used, the observer can be set to NULL to release it completely.

Implementation

void setMusicObserver(int musicId, TXMusicPlayObserver? observer);