destroyMusicPlayer
Destroys the music player object.
virtual int destroyMusicPlayer(agora_refptr<IMusicPlayer> music_player) = 0;
When you no longer need the music player, you can call this method to destroy the object. If you need to use the music player again after destruction, call createMusicPlayer to recreate it.
Timing
You can call this method before or after joining a channel, but it must be called before calling the release method.
Parameters
- music_player
- The music player object. See IMusicPlayer.
Return Values
- 0: Success.
- < 0: Failure.