setMusicTrack abstract method
Specify the Playback Track of Background Music
This API allows you to specify which track of the background music to play.
- Parameters:
- id(int):
- Music ID.
- index(int):
- Specify which track to play (the first track is played by default). Value range: [0, total number of tracks).
- id(int):
Note: The total number of tracks can be obtained through the getMusicTrackCount interface.
Implementation
void setMusicTrack(int id, int trackIndex);