destroyMediaPlayer method

Future<void> destroyMediaPlayer(
  1. ZegoMediaPlayer mediaPlayer
)

Destroys a media player instance.

Available since: 2.1.0 Description: Destroys a media player instance. Related APIs: User can call createMediaPlayer function to create a media player instance.

  • mediaPlayer The media player instance object to be destroyed.

Implementation

Future<void> destroyMediaPlayer(ZegoMediaPlayer mediaPlayer) async {
  return await ZegoExpressImpl.instance.destroyMediaPlayer(mediaPlayer);
}