StreamingConfig constructor
StreamingConfig({})
Implementation
StreamingConfig({
required this.resolution,
required this.fps,
required this.bitrate,
this.codec = 'H264',
this.audioBitrate,
}) {
if (resolution.isEmpty) {
throw ArgumentError.value(resolution, 'resolution', 'Must not be empty.');
}
if (fps.isEmpty) {
throw ArgumentError.value(fps, 'fps', 'Must not be empty.');
}
if (codec.isEmpty) {
throw ArgumentError.value(codec, 'codec', 'Must not be empty.');
}
if (bitrate <= 0) {
throw ArgumentError.value(bitrate, 'bitrate', 'Must be positive.');
}
if (audioBitrate != null && audioBitrate! <= 0) {
throw ArgumentError.value(
audioBitrate,
'audioBitrate',
'Must be positive.',
);
}
}