openVideoPlayer method

Future<void> openVideoPlayer(
  1. {required String url,
  2. OpenVideoPlayerConfiguration? config}
)

Opens video url with the config.

Implementation

Future<void> openVideoPlayer({
  required String url,
  OpenVideoPlayerConfiguration? config,
}) async {
  if (!FWGlobalState.getInstance().sdkInitCalled) {
    await FWGlobalState.getInstance().sdkInitCalledFuture;
  }
  final nativeMethodName = FireworkSDKNativeMethodName.openVideoPlayer.name;
  Map<String, dynamic> arg = {
    "url": url,
  };

  arg["config"] = VideoPlayerConfigurationUtil.toJson(config);

  FWMethodChannelUtil.getFirewokSDKChannel()
      .invokeMethod(nativeMethodName, arg);
}