VideoParameters.fromJson constructor
VideoParameters.fromJson(
- Map<String, dynamic> json
)
Implementation
factory VideoParameters.fromJson(Map<String, dynamic> json) {
return VideoParameters(
aspectRatio: json['AspectRatio'] as String?,
bitRate: json['BitRate'] as String?,
codec: json['Codec'] as String?,
codecOptions: (json['CodecOptions'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
displayAspectRatio: json['DisplayAspectRatio'] as String?,
fixedGOP: json['FixedGOP'] as String?,
frameRate: json['FrameRate'] as String?,
keyframesMaxDist: json['KeyframesMaxDist'] as String?,
maxFrameRate: json['MaxFrameRate'] as String?,
maxHeight: json['MaxHeight'] as String?,
maxWidth: json['MaxWidth'] as String?,
paddingPolicy: json['PaddingPolicy'] as String?,
resolution: json['Resolution'] as String?,
sizingPolicy: json['SizingPolicy'] as String?,
watermarks: (json['Watermarks'] as List?)
?.whereNotNull()
.map((e) => PresetWatermark.fromJson(e as Map<String, dynamic>))
.toList(),
);
}