setMusicObserver abstract method
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:
- musicId(int):
- Music ID.
- observer(TXMusicPlayObserver)
- musicId(int):
Note:
- 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);