destroyMusicPlayer

Destroys the music player object.

public abstract int destroyMusicPlayer(IAgoraMusicPlayer player);

If you need to use the music player again after destroying it, you must call the createMusicPlayer method to recreate it.

Timing

You can call this method before or after joining a channel, but you must ensure it is called before the destroy method.

Parameters

player
The music player object. See IAgoraMusicPlayer.

Return Values

  • 0: Success.
  • < 0: Failure.