HlsEncryptionSettings.fromJson constructor

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

Implementation

factory HlsEncryptionSettings.fromJson(Map<String, dynamic> json) {
  return HlsEncryptionSettings(
    constantInitializationVector:
        json['constantInitializationVector'] as String?,
    encryptionMethod:
        (json['encryptionMethod'] as String?)?.toHlsEncryptionType(),
    initializationVectorInManifest:
        (json['initializationVectorInManifest'] as String?)
            ?.toHlsInitializationVectorInManifest(),
    offlineEncrypted:
        (json['offlineEncrypted'] as String?)?.toHlsOfflineEncrypted(),
    spekeKeyProvider: json['spekeKeyProvider'] != null
        ? SpekeKeyProvider.fromJson(
            json['spekeKeyProvider'] as Map<String, dynamic>)
        : null,
    staticKeyProvider: json['staticKeyProvider'] != null
        ? StaticKeyProvider.fromJson(
            json['staticKeyProvider'] as Map<String, dynamic>)
        : null,
    type: (json['type'] as String?)?.toHlsKeyProviderType(),
  );
}