OTVSSPLicenseDelegate

public class OTVSSPLicenseDelegate : OTVCommonLicenseDelegate

OTVSSPLicenseDelegate is a default implementation of SSP with SSM Service.

  • Creates an instance of OTVSSPLicenceDelegate.

    Declaration

    Swift

    @objc
    public init(certificateURL: URL, licenseURL: URL, ssmServerURL: URL? = nil, syncSSMSetupTeardown: Bool = true)

    Parameters

    certificateURL

    URL of certificate file.

    licenseURL

    URL of license request.

    ssmServerURL

    Optional URL of SSM service request. Default is nil if SSM service not required.

    syncSSMSetupTeardown

    If ssmServerURL is provided this defines whether the setup and teardown network requests block the main thread or not. Default is to block.

  • Overrided function to pass HTTP header for license request. It is based on the setStream(token:with:) to generate SSP required headers.

    Declaration

    Swift

    @objc
    override public func generateHTTPHeaders(assetID: String) -> [String : String]?
  • Set the token and the url which associated with the stream.

    Declaration

    Swift

    @objc
    public func setStream(token: OTVMediaToken, with url: URL,
                          success: @escaping () -> Void = { /* Default Empty Closure */ },
                          failure: @escaping () -> Void = { /* Default Empty Closure */ })

    Parameters

    token

    the stream’s SSP specific media token.

    url

    URL of the stream.

    success

    closure for when the stream token and url are sucessfully set. Default to empty.

    failure

    closure for when the stream token and url fail to be set. Default to empty.