CameraCapturerConfiguration

The camera capturer preference.

class CameraCapturerConfiguration {
  const CameraCapturerConfiguration(
      {this.cameraDirection,
      this.deviceId,
      this.format,
      this.followEncodeDimensionRatio});

  @JsonKey(name: 'cameraDirection')
  final CameraDirection? cameraDirection;

  @JsonKey(name: 'deviceId')
  final String? deviceId;

  @JsonKey(name: 'format')
  final VideoFormat? format;

  @JsonKey(name: 'followEncodeDimensionRatio')
  final bool? followEncodeDimensionRatio;

  factory CameraCapturerConfiguration.fromJson(Map<String, dynamic> json) =>
      _$CameraCapturerConfigurationFromJson(json);

  Map<String, dynamic> toJson() => _$CameraCapturerConfigurationToJson(this);
}

Attributes

cameraDirection
Attention: This parameter applies to Android and iOS only.
The camera direction. See CameraDirection.
format
The format of the video frame. See VideoFormat.
deviceId
Attention: This method applies to Windows only.
The ID of the camera. The maximum length is MaxDeviceIdLengthType.
followEncodeDimensionRatio
Whether to follow the video aspect ratio set in setVideoEncoderConfiguration:
  • true: (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame.
  • false: Do not follow the system default audio playback device. The SDK does not change the aspect ratio of the captured video frame.