HlsGroupSettings.fromJson constructor

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

Implementation

factory HlsGroupSettings.fromJson(Map<String, dynamic> json) {
  return HlsGroupSettings(
    adMarkers: (json['adMarkers'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toHlsAdMarkers())
        .toList(),
    additionalManifests: (json['additionalManifests'] as List?)
        ?.whereNotNull()
        .map((e) => HlsAdditionalManifest.fromJson(e as Map<String, dynamic>))
        .toList(),
    audioOnlyHeader:
        (json['audioOnlyHeader'] as String?)?.toHlsAudioOnlyHeader(),
    baseUrl: json['baseUrl'] as String?,
    captionLanguageMappings: (json['captionLanguageMappings'] as List?)
        ?.whereNotNull()
        .map((e) =>
            HlsCaptionLanguageMapping.fromJson(e as Map<String, dynamic>))
        .toList(),
    captionLanguageSetting: (json['captionLanguageSetting'] as String?)
        ?.toHlsCaptionLanguageSetting(),
    clientCache: (json['clientCache'] as String?)?.toHlsClientCache(),
    codecSpecification:
        (json['codecSpecification'] as String?)?.toHlsCodecSpecification(),
    destination: json['destination'] as String?,
    destinationSettings: json['destinationSettings'] != null
        ? DestinationSettings.fromJson(
            json['destinationSettings'] as Map<String, dynamic>)
        : null,
    directoryStructure:
        (json['directoryStructure'] as String?)?.toHlsDirectoryStructure(),
    encryption: json['encryption'] != null
        ? HlsEncryptionSettings.fromJson(
            json['encryption'] as Map<String, dynamic>)
        : null,
    manifestCompression:
        (json['manifestCompression'] as String?)?.toHlsManifestCompression(),
    manifestDurationFormat: (json['manifestDurationFormat'] as String?)
        ?.toHlsManifestDurationFormat(),
    minFinalSegmentLength: json['minFinalSegmentLength'] as double?,
    minSegmentLength: json['minSegmentLength'] as int?,
    outputSelection:
        (json['outputSelection'] as String?)?.toHlsOutputSelection(),
    programDateTime:
        (json['programDateTime'] as String?)?.toHlsProgramDateTime(),
    programDateTimePeriod: json['programDateTimePeriod'] as int?,
    segmentControl:
        (json['segmentControl'] as String?)?.toHlsSegmentControl(),
    segmentLength: json['segmentLength'] as int?,
    segmentsPerSubdirectory: json['segmentsPerSubdirectory'] as int?,
    streamInfResolution:
        (json['streamInfResolution'] as String?)?.toHlsStreamInfResolution(),
    timedMetadataId3Frame: (json['timedMetadataId3Frame'] as String?)
        ?.toHlsTimedMetadataId3Frame(),
    timedMetadataId3Period: json['timedMetadataId3Period'] as int?,
    timestampDeltaMilliseconds: json['timestampDeltaMilliseconds'] as int?,
  );
}