Instance Method

persistentContentKeyFromKeyVendorResponse:options:error:

Obtains a persistable content key from a context.

Declaration

- (NSData *)persistentContentKeyFromKeyVendorResponse:(NSData *)keyVendorResponse options:(NSDictionary<NSString *,id> *)options error:(NSError * _Nullable *)outError;

Parameters

keyVendorResponse

The response returned from the key vendor as a result of a request generated from streamingContentKeyRequestDataForApp:contentIdentifier:options:error:.

options

Additional information necessary to obtain the key, or nil if no additional information is required.

error

If an error occurs while obtaining the peristable content key, This parameter contains an instance of NSError describing the failure.

Return Value

The persistable content key.

Discussion

The data returned from this method may be used to immediately satisfy an AVAssetResourceLoadingDataRequest, as well as any subsequent requests for the same key URL. The value of contentType must be set to AVStreamingKeyDeliveryPersistentContentKeyType when responding with data created with this method.

See Also

Accessing the Request Data

request

The URL request object for the resource.

requestor

The asset resource requestor that made the request.

AVAssetResourceLoadingRequestor

An object that contains information about the originator of a loading request.

- streamingContentKeyRequestDataForApp:contentIdentifier:options:error:

Obtains key request data for a specific combination of application and content.

AVAssetResourceLoadingRequestStreamingContentKeyRequestRequiresPersistentKey

Specifies whether the content key request requires a persistable key to be returned from the key vendor.

contentInformationRequest

The information for a requested resource.

dataRequest

The range of requested resource data.

redirect

An URL request instance if the loading request was redirected.