getMediaPlayer method
获取媒体播放器
Implementation
Future<MediaPlayer?> getMediaPlayer(int playerId) async {
if (Platform.isAndroid) {
$media_player_map[playerId] =
await ($instance as $a.RTCEngine).getMediaPlayer(playerId);
} else if (Platform.isIOS) {
$media_player_map[playerId] =
await ($instance as $i.ByteRTCEngine).getMediaPlayer(playerId);
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}',
);
}
return MediaPlayer(playerId);
}