createMediaPlayer method

Future<int> createMediaPlayer()

Implementation

Future<int> createMediaPlayer() async {
  var instance = await ZegoFlutterEngine.instance.createMediaPlayer();
  var i = _index;
  var mediaPlayer = MediaPlayer();
  mediaPlayer.instance = instance;
  _mediaPlayers[i] = mediaPlayer;
  _index++;
  return i;
}