BCOVFPSAuthorizationProxy Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | BCOVFPSAuthorizationProxy.h |
– 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
– encryptedContentKeyForContentKeyIdentifier:contentKeyRequest:source:options:completionHandler:
required method
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 , NSDate *__nullable expirationDate , 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 |
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