createNewInstancePlayer method
Implementation
void createNewInstancePlayer(OnPreparePlayer onPreparePlayer) {
logger.d("create new instance player in PlayerController");
try {
_channel.invokeMethod('createNewInstancePlayer');
} on PlatformException catch (e) {
logger.e("create new instance error: ${e.details} - ${e.message}");
}
_channel.setMethodCallHandler((call) async {
switch (call.method) {
case 'onPrepareContentError':
final errorCode = call.arguments['errorCode'] as int;
final message = call.arguments['message'] as String;
onPreparePlayer.onPrepareContentError(errorCode, message);
break;
}
});
}