init method

Future<void> init({
  1. required int appID,
  2. String appSign = '',
  3. String token = '',
  4. bool? enablePlatformView,
  5. bool playingStreamInPIPUnderIOS = false,
  6. ZegoScenario scenario = ZegoScenario.Default,
  7. bool withoutCreateEngine = false,
})

init

Called before enter room/push or pull stream

  • enablePlatformView, Not recommended for use. Current usage scenarios include:
  1. displaying PIP on iOS,
  2. playing MP4 on media.
  • playingStreamInPIPUnderIOS, If you want to display PIP iOS, you need to set it to true, and then the platform view + custom rendering mechanism will be launched. At this time, enablePlatformView should be set to true.

Implementation

Future<void> init({
  required int appID,
  String appSign = '',
  String token = '',
  bool? enablePlatformView,
  bool playingStreamInPIPUnderIOS = false,
  ZegoScenario scenario = ZegoScenario.Default,

  /// accept offline call invitation on android, will create in advance
  bool withoutCreateEngine = false,
}) async {
  return ZegoUIKitCore.shared.init(
    appID: appID,
    appSign: appSign,
    token: token,
    scenario: scenario,
    playingStreamInPIPUnderIOS: playingStreamInPIPUnderIOS,
    enablePlatformView: enablePlatformView,
    withoutCreateEngine: withoutCreateEngine,
  );
}