CmafEncryptionSettings.fromJson constructor

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

Implementation

factory CmafEncryptionSettings.fromJson(Map<String, dynamic> json) {
  return CmafEncryptionSettings(
    constantInitializationVector:
        json['constantInitializationVector'] as String?,
    encryptionMethod:
        (json['encryptionMethod'] as String?)?.toCmafEncryptionType(),
    initializationVectorInManifest:
        (json['initializationVectorInManifest'] as String?)
            ?.toCmafInitializationVectorInManifest(),
    spekeKeyProvider: json['spekeKeyProvider'] != null
        ? SpekeKeyProviderCmaf.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?)?.toCmafKeyProviderType(),
  );
}