preloadMusic abstract method

void preloadMusic(
  1. AudioMusicParam musicParam
)

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.

Note:

  1. 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 stopPlayMusic after use; otherwise, the memory will not be released.

  2. If the music corresponding to the ID is being played, the preloading fails, and stopPlayMusic must be called first.

  3. When the musicParam passed to startPlayMusic is exactly the same, preloading works.

Implementation

void preloadMusic(AudioMusicParam musicParam);