FairplayConfig class

Provides configuration options for FairPlay Streaming DRM. Only supported on iOS.

Inheritance
Annotations

Constructors

FairplayConfig({String? licenseUrl, String? certificateUrl, Map<String, String>? licenseRequestHeaders, Map<String, String>? certificateRequestHeaders, String prepareCertificate(String certificate)?, String prepareMessage(String spcData, String assetId)?, String prepareSyncMessage(String syncSpcData, String assetId)?, String prepareLicense(String ckc)?, String prepareLicenseServerUrl(String licenseServerUrl)?, String prepareContentId(String contentId)?})
const
FairplayConfig.fromJson(Map<String, dynamic> json)
factory

Properties

certificateRequestHeaders Map<String, String>?
A dictionary to specify custom HTTP headers for the certificate request.
final
certificateUrl String?
The URL to the FairPlay Streaming certificate of the license server.
final
hashCode int
The hash code for this object.
no setterinherited
licenseRequestHeaders Map<String, String>?
A dictionary to specify custom HTTP headers for the license request.
final
licenseUrl String?
The DRM license acquisition URL.
final
prepareCertificate → (String Function(String certificate)?)
A function to prepare the loaded certificate before building SPC data and passing it into the system. This is needed if the server responds with anything else than the certificate, e.g. if the certificate is wrapped into a JSON object. The server response for the certificate request is passed as parameter “as is”.
final
prepareContentId → (String Function(String contentId)?)
A function to prepare the contentId, which is sent to the FairPlay Streaming license server as request body, and which is used to build the SPC data. As many DRM providers expect different, vendor-specific messages, this can be done using this user-defined function. The parameter is the skd:// URI extracted from the HLS manifest (m3u8) and the return value should be the processed contentId as a String.
final
prepareLicense → (String Function(String ckc)?)
A function to prepare the loaded CKC Data before passing it to the system. This is needed if the server responds with anything else than the license, e.g. if the license is wrapped into a JSON object.
final
prepareLicenseServerUrl → (String Function(String licenseServerUrl)?)
A function to prepare the URI (without the skd://) from the HLS manifest before passing it to the system.
final
prepareMessage → (String Function(String spcData, String assetId)?)
A function to prepare the SPC data which is sent as the body of the POST license request. As many DRM providers expect different, vendor-specific messages, this can be done using this user-defined function.
final
prepareSyncMessage → (String Function(String syncSpcData, String assetId)?)
A function to prepare the sync SPC data which is sent as the body of the POST request for syncing the DRM license information.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this FairplayConfig into JSON friendly Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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