createEngine static method

  1. @Deprecated('Deprecated since 2.14.0, please use the method with the same name without [isTestEnv] parameter instead.')
Future<void> createEngine(
  1. int appID,
  2. String appSign,
  3. bool isTestEnv,
  4. ZegoScenario scenario, {
  5. bool? enablePlatformView,
})

Deprecated Create ZegoExpressEngine singleton object and initialize SDK. Deprecated since 2.14.0, please use the method with the same name without isTestEnv parameter instead. Please refer to Testing environment deprecation for more details.

Available: 1.1.0 ~ 2.13.1, deprecated since 2.14.0, please use the method with the same name without isTestEnv parameter instead Description: Create ZegoExpressEngine singleton object and initialize SDK. When to call: The engine needs to be created before calling other functions. Restrictions: None. Caution: The SDK only supports the creation of one instance of ZegoExpressEngine. If you need call createEngine multiple times, you need call destroyEngine before you call the next createEngine. Otherwise it will return the instance which created by createEngine you called last time.

@deprecated Deprecated since 2.14.0, please use the method with the same name without isTestEnv parameter instead.

  • appID Application ID issued by ZEGO for developers, please apply from the ZEGO Admin Console https://console.zegocloud.com The value ranges from 0 to 4294967295.
  • appSign Application signature for each AppID, please apply from the ZEGO Admin Console. Application signature is a 64 character string. Each character has a range of '0' ~ '9', 'a' ~ 'z'. AppSign 2.17.0 and later allows null or no transmission. If the token is passed empty or not passed, the token must be entered in the ZegoRoomConfig parameter for authentication when the loginRoom interface is called to login to the room.
  • isTestEnv Deprecated For providing better and more standardized services, starting from 2021-11-16, ZEGO no longer classifies environments into production environments and testing environments. f you create your project in ZEGO Admin Console on/before 2021-11-16, refer to Testing environment deprecation to upgrade the SDK and adjust related codes.
  • scenario The room scenario. the SDK will optimize the audio and video configuration for the specified scenario to achieve the best effect in this scenario. After specifying the scenario, you can call other APIs to adjusting the audio and video configuration. Differences between scenarios and how to choose a suitable scenario, please refer to https://docs.zegocloud.com/article/14940
  • enablePlatformView Set whether to use Platform View for rendering, true: rendering using Platform View, false: rendering using Texture, default is false. Currently the web platform only supports rendering with Platform View. When using the createCanvasView interface, If the preferred render mode is not supported, another render mode is automatically used.

Implementation

@Deprecated(
    'Deprecated since 2.14.0, please use the method with the same name without [isTestEnv] parameter instead.')
static Future<void> createEngine(
    int appID, String appSign, bool isTestEnv, ZegoScenario scenario,
    {bool? enablePlatformView}) async {
  return await ZegoExpressImpl.createEngine(
      appID, appSign, isTestEnv, scenario,
      enablePlatformView: enablePlatformView);
}