preloadMusic abstract method
Preload Background Music
You must assign an ID to each music track so that you can start, stop, or set the volume of music tracks by ID.
- Parameters:
- musicParam(AudioMusicParam):
- Music parameter.
- musicParam(AudioMusicParam):
Note:
Preload supports up to 2 preloads with different IDs at the same time, and the preload time does not exceed 10 minutes. You need to call
stopPlayMusicafter use; otherwise, the memory will not be released.If the music corresponding to the ID is being played, the preloading fails, and
stopPlayMusicmust be called first.When the
musicParampassed tostartPlayMusicis exactly the same, preloading works.
Implementation
void preloadMusic(AudioMusicParam musicParam);