initMeeduPlayer function

Future<void> initMeeduPlayer({
  1. bool iosUseFVP = false,
  2. bool androidUseFVP = false,
})

Parameters:

  • iosUseFVP: A boolean value indicating whether to use fvp on iOS.
  • androidUseFVP: A boolean value indicating whether to use fvp on Android.

Implementation

Future<void> initMeeduPlayer({
  bool iosUseFVP = false,
  bool androidUseFVP = false,
}) async {
  WidgetsFlutterBinding.ensureInitialized();
  // await initWindowManagerIfNeeded();
  if (UniversalPlatform.isDesktop ||
      (iosUseFVP && UniversalPlatform.isIOS) ||
      (androidUseFVP && UniversalPlatform.isAndroid)) {
    registerWith();
    VideoPlayerUsed.fvp = true;
  } else {
    VideoPlayerUsed.videoPlayer = true;
  }
  if (UniversalPlatform.isDesktop) {
    await windowManager.ensureInitialized();
  }
}