DrmConfigMapper class

Pure-Dart mapper from the sealed ByteArkDrm hierarchy to the JS drm field expected by the ByteArk Web SDK's bytearkShaka (Widevine) and FairPlay plugins.

JS shape per the SDK docs at https://docs.byteark.com/en/player/web/content-protection/:

drm: {
  widevine: {
    url: '<license server>',
    licenseRequestHeaders: [{ name: 'Authorization', value: '…' }],
    // optional: serverCertificateUrl, videoRobustness, audioRobustness
  }
}

drm: {
  fairplay: {
    certificateUrl: '<app cert>',
    processSpcUrl: '<license server>',
    licenseRequestHeaders: [{ name: 'Authorization', value: '…' }],
  }
}

The Dart side keeps headers as an idiomatic Map<String, String>; this mapper translates each entry to a {name, value} object so the SDK can iterate them as a list.

PlayReady is not handled — ByteArk Web doesn't support it and the sealed ByteArkDrm hierarchy has no PlayReady subclass.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

mapDrm(ByteArkDrm? drm) Map<String, dynamic>?
Maps a single ByteArkDrm to the SDK's drm map shape, or returns null for a null input.