BCOVFPSAuthorizationProxy Protocol Reference

Conforms to NSObject
Declared in BCOVFPSAuthorizationProxy.h

Overview

Implement this protocol when interacting with a custom FPS license server.

– contentIdentifierFromLoadingRequest:

Optional method. Implement this method to handle retrieving the content identifier from the loading request. This is called for each asset. No guarantee is made as to the thread that this is called on. You should return the content identifier corresponding to this loading request. This is typically extracted from the “skd://…” URL in loadingRequest.request.URL. The content identifier will be passed to [AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp:contentIdentifier:options:error:] to retrieve the SPC.

- (nullable NSData *)contentIdentifierFromLoadingRequest:(nonnull AVAssetResourceLoadingRequest *)loadingRequest

Parameters

loadingRequest

The skd:// loading request made for the asset.

Discussion

Optional method. Implement this method to handle retrieving the content identifier from the loading request. This is called for each asset. No guarantee is made as to the thread that this is called on. You should return the content identifier corresponding to this loading request. This is typically extracted from the “skd://…” URL in loadingRequest.request.URL. The content identifier will be passed to [AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp:contentIdentifier:options:error:] to retrieve the SPC.

If this method is not provided, the default method will be used. The default method removes “skd://” from loadingRequest.request.URL to generate the content identifier.

Declared In

BCOVFPSAuthorizationProxy.h

– encryptedContentKeyForLoadingRequest:contentKeyRequest:source:completionHandler: required method

Implement this method to handle retrieving the content key. This is called for each asset. No guarantee is made as to the thread that this is called on.

- (void)encryptedContentKeyForLoadingRequest:(nonnull AVAssetResourceLoadingRequest *)loadingRequest contentKeyRequest:(nonnull NSData *)keyRequest source:(nonnull BCOVSource *)source completionHandler:(nonnull void ( ^ ) ( NSURLResponse *__nullable response , NSData *__nullable contentKey , NSError *__nullable error ))completionHandler

Parameters

loadingRequest

The “skd://…” loading request made for the asset.

keyRequest

The key request data returned by [AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp:contentIdentifier:options:error:].

source

The BCOVSource used to make this request

completionHandler

The completion handler to return the content key. If returning an error, you must leave the contentkey and response parameters nil.

Discussion

Implement this method to handle retrieving the content key. This is called for each asset. No guarantee is made as to the thread that this is called on.

Declared In

BCOVFPSAuthorizationProxy.h

– encryptedContentKeyForContentKeyIdentifier:contentKeyRequest:source:options:completionHandler:

Implement this method to handle retrieving the content key for a video that is being downloaded for offline playback. This is called for each asset. No guarantee is made as to the thread that this is called on.

- (void)encryptedContentKeyForContentKeyIdentifier:(nonnull NSString *)contentKeyIdentifier contentKeyRequest:(nonnull NSData *)keyRequest source:(nonnull BCOVSource *)source options:(nullable NSDictionary *)options completionHandler:(nonnull void ( ^ ) ( NSURLResponse *__nullable response , NSData *__nullable contentKey , NSError *__nullable error ))completionHandler

Parameters

contentKeyIdentifier

The “skd://…” loading request URL string made for the asset.

keyRequest

The key request data returned by [AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp:contentIdentifier:options:error:].

source

The BCOVSource used to make this request

options

The parameters originally passed to -BCOVOfflineVideoManager requestVideoDownload:parameters:completion:

completionHandler

The completion handler to return the content key. If returning an error, you must leave the contentkey and response parameters nil.

Discussion

Implement this method to handle retrieving the content key for a video that is being downloaded for offline playback. This is called for each asset. No guarantee is made as to the thread that this is called on.

Declared In

BCOVFPSAuthorizationProxy.h