CameraController constructor

CameraController(
  1. CameraDescription description,
  2. ResolutionPreset resolutionPreset, {
  3. bool enableAudio = true,
  4. int? fps,
  5. int? videoBitrate,
  6. int? audioBitrate,
  7. ImageFormatGroup? imageFormatGroup,
})

Creates a new camera controller in an uninitialized state.

  • resolutionPreset affect the quality of video recording and image capture.
  • enableAudio controls audio presence in recorded video.

Following parameters (if present) will overwrite resolutionPreset settings:

  • fps controls rate at which frames should be captured by the camera in frames per second.
  • videoBitrate controls the video encoding bit rate for recording.
  • audioBitrate controls the audio encoding bit rate for recording.

Implementation

CameraController(
  CameraDescription description,
  ResolutionPreset resolutionPreset, {
  bool enableAudio = true,
  int? fps,
  int? videoBitrate,
  int? audioBitrate,
  this.imageFormatGroup,
})  : mediaSettings = MediaSettings(
          resolutionPreset: resolutionPreset,
          enableAudio: enableAudio,
          fps: fps,
          videoBitrate: videoBitrate,
          audioBitrate: audioBitrate),
      super(CameraValue.uninitialized(description));