OTVDRMManager
@interface OTVDRMManager : NSObject
The OTVDRMManager
class sets up an instance of DRM based upon OTVLicenseDelegate
.
-
Declaration
Objective-C
@property (nonatomic, class, readonly, strong) OTVDRMManager * _Nonnull shared
-
Set the license delegate for
OTVDRMManager
based 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. \param delegate An instance ofOTVLicenseDelegate
.Declaration
Objective-C
- (void)setLicenseDelegate:(id<OTVLicenseDelegate> _Nonnull)delegate;
-
Declaration
Objective-C
- (void)requestLicenseWithIdentifier:(NSString * _Nonnull)identifier license:(NSDictionary<NSString *, id> * _Nullable)options;
-
Check is license is persisted This function is called to determing if a license is persisted or not. \param identifier license identifier. Usually comes from playlist. For FairPlay, it should be
skd://.....
returns:
true
- the license exists orfalse
- the license does not exist.Declaration
Objective-C
- (BOOL)isLicensePersistedWithIdentifier:(NSString *_Nonnull)identifier;
-
Erase the license persistence on the local storage. \param identifier license identifier. same format when used in
requestLicense
.returns:
true
- the license has successfully been erased from local system.false
- the license does not exist.Declaration
Objective-C
- (BOOL)eraseOfflineLicenseWithIdentifier:(NSString *_Nonnull)identifier;
-
Declaration
Objective-C
- (void)renewLicenseWithIdentifier:(NSString * _Nonnull)identifier license:(NSDictionary<NSString *, id> * _Nullable)options;