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
OTVDRMManagerinstance.Declaration
Swift
@objc public static let shared: OTVDRMManager -
Set the license delegate for
OTVDRMManagerbased onOTVLicenseDelegate.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
delegateAn 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) -> BoolParameters
identifierlicense identifier. Usually comes from playlist. For FairPlay, it should be
skd://.....Return Value
true- the license exists orfalse- the license does not exist. -
Erase the license persistence on the local storage.
Declaration
Swift
@objc public func eraseOfflineLicense(identifier: String) -> BoolParameters
identifierlicense 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
See moreOTVDRMManagerto define a number of values to use as keys in dictionary lookups.Declaration
Swift
public struct Keys