CmafGroupSettings.fromJson constructor

CmafGroupSettings.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CmafGroupSettings.fromJson(Map<String, dynamic> json) {
  return CmafGroupSettings(
    additionalManifests: (json['additionalManifests'] as List?)
        ?.whereNotNull()
        .map(
            (e) => CmafAdditionalManifest.fromJson(e as Map<String, dynamic>))
        .toList(),
    baseUrl: json['baseUrl'] as String?,
    clientCache: (json['clientCache'] as String?)?.toCmafClientCache(),
    codecSpecification:
        (json['codecSpecification'] as String?)?.toCmafCodecSpecification(),
    destination: json['destination'] as String?,
    destinationSettings: json['destinationSettings'] != null
        ? DestinationSettings.fromJson(
            json['destinationSettings'] as Map<String, dynamic>)
        : null,
    encryption: json['encryption'] != null
        ? CmafEncryptionSettings.fromJson(
            json['encryption'] as Map<String, dynamic>)
        : null,
    fragmentLength: json['fragmentLength'] as int?,
    manifestCompression:
        (json['manifestCompression'] as String?)?.toCmafManifestCompression(),
    manifestDurationFormat: (json['manifestDurationFormat'] as String?)
        ?.toCmafManifestDurationFormat(),
    minBufferTime: json['minBufferTime'] as int?,
    minFinalSegmentLength: json['minFinalSegmentLength'] as double?,
    mpdProfile: (json['mpdProfile'] as String?)?.toCmafMpdProfile(),
    segmentControl:
        (json['segmentControl'] as String?)?.toCmafSegmentControl(),
    segmentLength: json['segmentLength'] as int?,
    streamInfResolution:
        (json['streamInfResolution'] as String?)?.toCmafStreamInfResolution(),
    writeDashManifest:
        (json['writeDashManifest'] as String?)?.toCmafWriteDASHManifest(),
    writeHlsManifest:
        (json['writeHlsManifest'] as String?)?.toCmafWriteHLSManifest(),
    writeSegmentTimelineInRepresentation:
        (json['writeSegmentTimelineInRepresentation'] as String?)
            ?.toCmafWriteSegmentTimelineInRepresentation(),
  );
}