OTVDRMManager

public class OTVDRMManager : NSObject

The OTVDRMManager class sets up an instance of DRM based upon OTVLicenseDelegate.

  • Declaration

    Swift

    public enum OTVDRMLicenseError : Int
  • The shared OTVDRMManager instance.

    Declaration

    Swift

    @objc
    public static let shared: OTVDRMManager
  • Set the license delegate for OTVDRMManager based on OTVLicenseDelegate.

    Note

    The delegate is held using a zeroing-weak reference, so it has a value of nil after it has been deallocated outside. Ensure the delegate is retained until it is no longer needed by player.

    Declaration

    Swift

    @objc
    public func setLicenseDelegate(_ delegate: OTVLicenseDelegate)

    Parameters

    delegate

    An instance of OTVLicenseDelegate.

  • Declaration

    Swift

    @objc
    public func requestLicense(identifier: String, license options: [String : Any]? = nil)
  • Check is license is persisted This function is called to determing if a license is persisted or not.

    Declaration

    Swift

    @objc
    public func isLicensePersisted(identifier: String) -> Bool

    Parameters

    identifier

    license identifier. Usually comes from playlist. For FairPlay, it should be skd://.....

    Return Value

    true - the license exists or false - the license does not exist.

  • Erase the license persistence on the local storage.

    Declaration

    Swift

    @objc
    public func eraseOfflineLicense(identifier: String) -> Bool

    Parameters

    identifier

    license identifier. same format when used in requestLicense.

    Return Value

    true - the license has successfully been erased from local system. false - the license does not exist.

  • Declaration

    Swift

    @objc
    public func renewLicense(identifier: String, license options: [String : Any]? = nil)
  • Extends OTVDRMManager to define a number of values to use as keys in dictionary lookups.

    See more

    Declaration

    Swift

    public struct Keys