useFrontCamera method

Future<void> useFrontCamera(
  1. bool enable,
  2. {ZegoPublishChannel? channel}
)

Switches to the front or the rear camera (for the specified channel).

Available since: 1.1.0 Description: This function controls whether ZegoVideoSourceTypeCamera uses the front camera or the rear camera (only supported by Android and iOS). Default value: The default is true which means the front camera is used. When to call: After creating the engine createEngine. Restrictions: None. Caution: When the custom video capture function enableCustomVideoCapture is turned on, since the developer has taken over the video data capture, the SDK is no longer responsible for the video data capture, and this function is no longer valid. Note: This function is only available in ZegoExpressVideo SDK!

  • enable ZegoVideoSourceTypeCamera if or not use front camera, true: use the front camera, false: use the the rear camera.
  • channel Publishing stream channel.

Implementation

Future<void> useFrontCamera(bool enable,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance
      .useFrontCamera(enable, channel: channel);
}