init method
init
Called before enter room/push or pull stream
enablePlatformView
, Not recommended for use. Current usage scenarios include:
- displaying PIP on iOS,
- 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,
);
}