HlsPackage.fromJson constructor
HlsPackage.fromJson(
- Map<String, dynamic> json
)
Implementation
factory HlsPackage.fromJson(Map<String, dynamic> json) {
return HlsPackage(
adMarkers: (json['adMarkers'] as String?)?.toAdMarkers(),
adTriggers: (json['adTriggers'] as List?)
?.whereNotNull()
.map((e) => (e as String).toAdTriggersElement())
.toList(),
adsOnDeliveryRestrictions: (json['adsOnDeliveryRestrictions'] as String?)
?.toAdsOnDeliveryRestrictions(),
encryption: json['encryption'] != null
? HlsEncryption.fromJson(json['encryption'] as Map<String, dynamic>)
: null,
includeIframeOnlyStream: json['includeIframeOnlyStream'] as bool?,
playlistType: (json['playlistType'] as String?)?.toPlaylistType(),
playlistWindowSeconds: json['playlistWindowSeconds'] as int?,
programDateTimeIntervalSeconds:
json['programDateTimeIntervalSeconds'] as int?,
segmentDurationSeconds: json['segmentDurationSeconds'] as int?,
streamSelection: json['streamSelection'] != null
? StreamSelection.fromJson(
json['streamSelection'] as Map<String, dynamic>)
: null,
useAudioRenditionGroup: json['useAudioRenditionGroup'] as bool?,
);
}