An object used to create and track decryption keys for media data.
SDKs
- iOS 10.3+
- macOS 10.12.4+
- Mac Catalyst 13.0+
- tvOS 10.2+
Framework
- AVFoundation
Declaration
class AVContentKeySession : NSObject
An object used to create and track decryption keys for media data.
SDKs
Framework
class AVContentKeySession : NSObject
init(key System: AVContent Key System)
Creates a content key session to manage a collection of content decryption keys.
init(key System: AVContent Key System, storage Directory At: 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 key System: AVContent Key System
The type of key system used to retrieve keys.
struct AVContent Key System
A key-delivery method for a content key session.
func set Delegate(AVContent Key Session Delegate?, queue: Dispatch Queue?)
Sets the receiver's delegate and indicates the dispatch queues used.
var delegate: AVContent Key Session Delegate?
The delegate for the receiver.
protocol AVContent Key Session Delegate
The protocol you implement to handle content key requests.
var delegate Queue: Dispatch Queue?
The dispatch queue that invokes delegate callbacks.
func add Content Key Recipient(AVContent Key Recipient)
Tells the receiver that the specified recipient should have access to the decryption keys loaded with the session.
var content Key Recipients: [AVContent Key Recipient]
An array of content key recipients.
protocol AVContent Key Recipient
A protocol for requiring decryption keys for media data.
func process Content Key Request(with Identifier: Any?, initialization Data: Data?, options: [String : Any]?)
Tells the receiver to start loading the content decryption key with the specified identifier and initialization data.
func renew Expiring Response Data(for: AVContent Key Request)
Tells the receiver that previously provided response data for a content key request is about to expire.
func make Secure Token For Expiration Date(of Persistable Content Key: Data, completion Handler: (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 content Protection Session Identifier: Data?
The identifier for the current content protection session.
func expire()
Tells the receiver that the session expired as the result of normal, intentional processes.
func remove Content Key Recipient(AVContent Key Recipient)
Tells the receiver to remove the specified recipient.
protocol AVContent Key Recipient
A protocol for requiring decryption keys for media data.
class func pending Expired Session Reports(with App Identifier: Data, storage Directory At: URL) -> [Data]
Returns the expired session reports for content key sessions created with the specified app identifier.
class func remove Pending Expired Session Reports([Data], with App Identifier: Data, storage Directory At: URL)
Removes expired session reports from storage.
var storage URL: URL?
A URL that points to a writable storage directory.
class AVContent Key Request
An object that encapsulates information about a content decryption key request issued from a content key session object.
class AVContent Key Response
An object that encapsulates information about a response to a content decryption key request.
class AVPersistable Content Key Request
An object that encapsulates information about a persistable content decryption key request issued from a content key session.