Class

AVContentKeySession

An object used to create and track decryption keys for media data.

Declaration

class AVContentKeySession : NSObject

Topics

Creating New Content Key Sessions

init(keySystem: AVContentKeySystem)

Creates a content key session to manage a collection of content decryption keys.

init(keySystem: AVContentKeySystem, storageDirectoryAt: URL)

Creates a content key session to manage a collection of content decryption keys; points to a directory that stores abnormal session termination reports.

var keySystem: AVContentKeySystem

The type of key system used to retrieve keys.

struct AVContentKeySystem

A key-delivery method for a content key session.

Initializing the Content Key Request Process

func setDelegate(AVContentKeySessionDelegate?, queue: DispatchQueue?)

Sets the receiver's delegate and indicates the dispatch queues used.

var delegate: AVContentKeySessionDelegate?

The delegate for the receiver.

protocol AVContentKeySessionDelegate

The protocol you implement to handle content key requests.

var delegateQueue: DispatchQueue?

The dispatch queue that invokes delegate callbacks.

func addContentKeyRecipient(AVContentKeyRecipient)

Tells the receiver that the specified recipient should have access to the decryption keys loaded with the session.

var contentKeyRecipients: [AVContentKeyRecipient]

An array of content key recipients.

protocol AVContentKeyRecipient

A protocol for requiring decryption keys for media data.

func processContentKeyRequest(withIdentifier: Any?, initializationData: Data?, options: [String : Any]?)

Tells the receiver to start loading the content decryption key with the specified identifier and initialization data.

Updating Content Key Requests

func renewExpiringResponseData(for: AVContentKeyRequest)

Tells the receiver that previously provided response data for a content key request is about to expire.

func makeSecureTokenForExpirationDate(ofPersistableContentKey: Data, completionHandler: (Data?, Error?) -> Void)

Creates a secure server playback context that the client sends to the key server to get an expiration date for the given persistable content key data.

var contentProtectionSessionIdentifier: Data?

The identifier for the current content protection session.

Ending a Content Key Request Process

func expire()

Tells the receiver that the session expired as the result of normal, intentional processes.

func removeContentKeyRecipient(AVContentKeyRecipient)

Tells the receiver to remove the specified recipient.

protocol AVContentKeyRecipient

A protocol for requiring decryption keys for media data.

Handling Expired Session Reports

class func pendingExpiredSessionReports(withAppIdentifier: Data, storageDirectoryAt: URL) -> [Data]

Returns the expired session reports for content key sessions created with the specified app identifier.

var storageURL: URL?

A URL that points to a writable storage directory.

Relationships

Inherits From

Conforms To

See Also

Content Key Decryption

class AVContentKeyRequest

An object that encapsulates information about a content decryption key request issued from a content key session object.

class AVContentKeyResponse

An object that encapsulates information about a response to a content decryption key request.

class AVPersistableContentKeyRequest

An object that encapsulates information about a persistable content decryption key request issued from a content key session.