playMusic abstract method
Future<void>
playMusic(
- String musicId, {
- required AudioTrackType trackType,
- required AudioPlayType playType,
Plays the music.
musicId: Music ID.
If the song with the same musicId is playing when you call this API, the music will restart from the starting position.
An error will be triggered if the audio file corresponding to musicId does not exist.
trackType: Audio track type of the KTV player.
playType: Audio play type.
After calling this API, you can receive music playing status through RTCKTVPlayerEventHandler.onPlayStateChanged.
Implementation
Future<void> playMusic(
String musicId, {
required AudioTrackType trackType,
required AudioPlayType playType,
});