OTVCommonLicenseDelegate

open class OTVCommonLicenseDelegate : NSObject, OTVLicenseDelegate

OTVCommonLicenceDelegate is a default implementation of OTVLicenseDelegate.

  • Creates an instance of OTVCommonLicenceDelegate.

    Declaration

    Swift

    @objc
    public init(certificateURL: URL, licenseURL: URL)

    Parameters

    certificateURL

    URL of certificate file.

    licenseURL

    URL of license request.

OTVLicenseDelegate stub (overridable)

  • Returns scheme for fairplay “skd”. This function can be override for mutltidrm. More in OTVLicenseDelegate.

    Declaration

    Swift

    open func scheme() -> String?
  • Returns the content identifier. This function can be override for mutltidrm. More in OTVLicenseDelegate.

    Declaration

    Swift

    open func contentIdentifier(url: URL) -> Data?
  • Returns the certificate. This function can be override for mutltidrm. More in OTVLicenseDelegate.

    Declaration

    Swift

    open func certificate() -> Data?
  • Returns the Content Key Context (CKC) message. This function can be override for mutltidrm. More in OTVLicenseDelegate.

    Declaration

    Swift

    open func ckcMessage(spc: Data) -> Data?
  • Returns the Content Key Context (CKC) message. This function can be override for mutltidrm. More in OTVLicenseDelegate.

    Declaration

    Swift

    open func ckcMessageWithID(spc: Data, assetID: String) -> Data?
  • Declaration

    Swift

    open func ckcMessageWith(spc: Data, assetID: String, session: AVContentKeySession, keyRequest: AVContentKeyRequest) -> Data?

OTVCommonLicenseDelegate function (overridable)

  • Returns the license HTTP Request custom headers. This function must be overridden for multidrm. Default returns empty Dictionary. If a nil Dictionary is returned the licence request is not sent.

    Declaration

    Swift

    @objc
    open func generateHTTPHeaders(assetID: String) -> [String : String]?

    Parameters

    assetID

    client should use passed assetID to generate correctly http headers.

  • Declaration

    Swift

    @objc
    open func getLicenseRequestUrl() -> URL
  • Declaration

    Swift

    @objc
    open func getCkcFromLicenseResponse(response: [String : Any]) -> String?