OTVSSPLicenseDelegate


@interface OTVSSPLicenseDelegate : OTVCommonLicenseDelegate

OTVSSPLicenseDelegate is a default implementation of SSP with SSM Service.

  • Set the type for the HTTP requesting headers \param type String value of HTTP header type. Defaults to nv-authorizations. If an empty string is passed it was also default to nv-authorizations

    Declaration

    Objective-C

    - (void)setHTTPHeaderTypeWithType:(NSString *_Nonnull)type;
  • Creates an instance of OTVSSPLicenceDelegate. \param certificateURL URL of certificate file.

    \param licenseURL URL of license request.

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

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCertificateURL:(NSURL *_Nonnull)certificateURL
                                        licenseURL:(NSURL *_Nonnull)licenseURL
                                      ssmServerURL:(NSURL *_Nullable)ssmServerURL
                              syncSSMSetupTeardown:(BOOL)syncSSMSetupTeardown;
  • Creates an instance of OTVSSPLicenceDelegate. \param certificateURL URL of certificate file.

    \param licenseURL URL of license request.

    \param ssmServerURL Optional URL of SSM service request.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCertificateURL:(NSURL *_Nonnull)certificateURL
                                        licenseURL:(NSURL *_Nonnull)licenseURL
                                      ssmServerURL:(NSURL *_Nullable)ssmServerURL;
  • Creates an instance of OTVSSPLicenceDelegate. \param certificateURL URL of certificate file.

    \param licenseURL URL of license request.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCertificateURL:(NSURL *_Nonnull)certificateURL
                                        licenseURL:(NSURL *_Nonnull)licenseURL;
  • Declaration

    Objective-C

    - (NSDictionary<NSString *, NSString *> *_Nullable)
        generateHTTPHeadersWithAssetID:(NSString *_Nonnull)assetID;
  • Declaration

    Objective-C

    - (NSURL * _Nonnull)getLicenseRequestUrl SWIFT_WARN_UNUSED_RESULT;
  • Declaration

    Objective-C

    - (NSString * _Nullable)getCkcFromLicenseResponseWithResponse:(NSDictionary<NSString *, id> * _Nonnull)response SWIFT_WARN_UNUSED_RESULT;
  • Declaration

    Objective-C

    - (NSData *_Nullable)ckcMessageWithSpc:(NSData *_Nonnull)spc
                                   assetID:(NSString *_Nonnull)assetID
                                   session:(AVContentKeySession *_Nonnull)session
                                keyRequest:
                                    (AVContentKeyRequest *_Nonnull)keyRequest;
  • Set the token and the url which associated with the stream. note: If repeated license request require a new media token please use setToken() as any repeated license request will use the original token set from this function. \param token the stream’s SSP specific media token.

    \param url URL of the stream.

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

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

    Declaration

    Objective-C

    - (void)setStreamWithToken:(NSString *_Nonnull)token
                          with:(NSURL *_Nonnull)url
                       success:(void (^_Nonnull)(void))success
                       failure:(void (^_Nonnull)(void))failure;
  • Application to set the initial stream token and callback which will be used by SDK to request for a new SSP content token, when a new license is requested. note: If repeated license requests do not need a new media token, please use setStream() as this function will request a new media token for each licnese request after the first. \param initialToken The stream’s SSP specific media token to be used for the initial playback

    \param tokenCallback Callback to be used to request the new media token. This callback is fired when a new licnese request is generated.

    Declaration

    Objective-C

    - (void)setTokenWithInitialToken:(NSString *_Nonnull)initialToken
                       tokenCallback:
                           (NSString *_Nonnull (^_Nonnull)(void))tokenCallback;