CmafPackage.fromJson constructor

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

Implementation

factory CmafPackage.fromJson(Map<String, dynamic> json) {
  return CmafPackage(
    hlsManifests: (json['hlsManifests'] as List)
        .whereNotNull()
        .map((e) => HlsManifest.fromJson(e as Map<String, dynamic>))
        .toList(),
    encryption: json['encryption'] != null
        ? CmafEncryption.fromJson(json['encryption'] as Map<String, dynamic>)
        : null,
    segmentDurationSeconds: json['segmentDurationSeconds'] as int?,
  );
}