VideoEncoderConfig constructor

VideoEncoderConfig({
  1. required String codec,
  2. required int width,
  3. required int height,
  4. int? displayWidth,
  5. int? displayHeight,
  6. int? bitrate,
  7. double? framerate,
  8. HardwareAcceleration? hardwareAcceleration,
  9. AlphaOption? alpha,
  10. String? scalabilityMode,
  11. BitrateMode? bitrateMode,
  12. LatencyMode? latencyMode,
})

Implementation

factory VideoEncoderConfig(
        {required String codec,
        required int width,
        required int height,
        int? displayWidth,
        int? displayHeight,
        int? bitrate,
        double? framerate,
        HardwareAcceleration? hardwareAcceleration,
        AlphaOption? alpha,
        String? scalabilityMode,
        BitrateMode? bitrateMode,
        LatencyMode? latencyMode}) =>
    VideoEncoderConfig._(
        codec: codec,
        width: width,
        height: height,
        displayWidth: displayWidth ?? undefined,
        displayHeight: displayHeight ?? undefined,
        bitrate: bitrate ?? undefined,
        framerate: framerate ?? undefined,
        hardwareAcceleration: hardwareAcceleration?.value ??
            HardwareAcceleration.noPreference.value,
        alpha: alpha?.value ?? AlphaOption.discard.value,
        scalabilityMode: scalabilityMode ?? undefined,
        bitrateMode: bitrateMode?.value ?? BitrateMode.variable.value,
        latencyMode: latencyMode?.value ?? LatencyMode.quality.value);