onPlayStateChanged property
Callback for music playback status change.
You will receive this callback on following events:
- When you successfully start playing music by calling RTCKTVPlayer.playMusic, you will receive this callback with the playState being
playing. Otherwise the playState will befailed. - If the music with the same music ID is playing when you call RTCKTVPlayer.playMusic again, the music will restart from the starting position, and you will receive this callback with
playingplayState to inform the latter music has started. - When you successfully pause the music by calling RTCKTVPlayer.pauseMusic, you will receive this callback with
pausedplayState. Otherwise the playState will befailed. - When you successfully resume the music by calling RTCKTVPlayer.resumeMusic, you will receive this callback with
playingplayState. Otherwise the playState will befailed. - When you successfully stop the music by calling RTCKTVPlayer.stopMusic, you will receive this callback with
stoppedplayState. Otherwise the playState will befailed. - When the music ends, you will receive this callback with
finishedplayState.
Implementation
OnPlayStateChangedType? onPlayStateChanged;