BMPFairplayConfiguration
Objective-C
@interface BMPFairplayConfiguration : BMPDRMConfiguration
Swift
class FairplayConfiguration : DRMConfiguration
Represents a FairPlay Streaming DRM configuration.
-
The URL to the FairPlay Streaming certificate of the license server.
Declaration
Objective-C
@property (nonatomic, strong) NSURL *_Nonnull certificateUrl;
Swift
var certificateUrl: URL { get set }
-
A dictionary to specify custom HTTP headers for the license request.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSDictionary<NSString *, NSString *> *licenseRequestHeaders;
Swift
var licenseRequestHeaders: [String : String]? { get set }
-
A dictionary to specify custom HTTP headers for the certificate request.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSDictionary<NSString *, NSString *> *certificateRequestHeaders;
Swift
var certificateRequestHeaders: [String : String]? { get set }
-
A block to prepare the 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 block.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSData *_Nonnull (^) (NSData *_Nonnull, NSString *_Nonnull) prepareMessage;
Swift
var prepareMessage: ((Data, String) -> Data)? { get set }
-
A block 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 block. The parameter is the skd:// URI extracted from the HLS manifset (m3u8) and the return value should be the contentID as string.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *_Nonnull (^) (NSString *_Nonnull) prepareContentId;
Swift
var prepareContentId: ((String) -> String)? { get set }
-
A block 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”.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSData *_Nonnull (^) (NSData *_Nonnull) prepareCertificate;
Swift
var prepareCertificate: ((Data) -> Data)? { get set }
-
A block 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.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSData *_Nonnull (^) (NSData *_Nonnull) prepareLicense;
Swift
var prepareLicense: ((Data) -> Data)? { get set }
-
A block to prepare the URI (without the
skd://
) from the HLS manifest before passing it to the system.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *_Nonnull (^) (NSString *_Nonnull) prepareLicenseServerUrl;
Swift
var prepareLicenseServerUrl: ((String) -> String)? { get set }
-
A block to prepare the loaded CKC data received by the Sync SPC call to the respective Key Security Module (KSM). This data may contain information about the expiration dates of a DRM license.
Declaration
Objective-C
@property (nonatomic, copy, nullable) BMPDrmLicenseInformation *_Nonnull (^)(NSData *_Nonnull) prepareOfflineDrmLicenseInformation;
Swift
var prepareOfflineDrmLicenseInformation: ((Data) -> DrmLicenseInformation)? { get set }
-
A block to prepare the data which is sent as the body of the POST request for syncing the DRM license information.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSData *_Nonnull (^) (NSData *_Nonnull, NSString *_Nonnull) prepareSyncMessage;
Swift
var prepareSyncMessage: ((Data, String) -> Data)? { get set }
-
Creates a new FairPlay Streaming configuration based on the given license URL and certificate URL.
Declaration
Objective-C
- (nonnull instancetype)initWithLicenseUrl:(nullable NSURL *)licenseUrl certificateURL:(nonnull NSURL *)certificateUrl;
Swift
init(license licenseUrl: URL?, certificateURL certificateUrl: URL)
Parameters
licenseUrl
The URL to the license server.
certificateUrl
The URL to the FairPlay Streaming certificate of the license server.
Return Value
A new FairPlay Streaming configuration initialized with the given licenseURL and certificateURL.
-
Creates a new FairPlay Streaming configuration based on the given certificate URL.
Declaration
Objective-C
- (nonnull instancetype)initWithCertificateURL:(nonnull NSURL *)certificateUrl;
Swift
convenience init(certificateURL certificateUrl: URL)
Parameters
certificateUrl
The URL to the FairPlay Streaming certificate of the license server.
Return Value
A new FairPlay Streaming configuration initialized with the given cerfificateURL. The license URL defaults to nil.