OTVLicenseDelegate
@objc
public protocol OTVLicenseDelegate : NSObjectProtocol
The OTVLicenseDelegate protocol defines methods that allows your code to handle the FPS request while playing a FairPlay encrypted stream.
-
Returns the scheme that the integrator uses in the
EXT-X-KEYURI.Declaration
Swift
func scheme() -> String?Return Value
String: Of Scheme.
-
Returns the content identifier that the integrator uses in the server side.
Declaration
Swift
func contentIdentifier(url: URL) -> Data?Parameters
urlURL The URL is the
EXT-X-KEYURI, which may contain the information about the content identifier. (The integrator decides what this parameter contains.)Return Value
Data contains the content identifier.
-
Returns the certificate that integrator uses in the server side.
Declaration
Swift
func certificate() -> Data?Return Value
Data contains the certificate.
-
Returns the Content Key Context (CKC) message from the server side that is used to decrypt the FairPlay stream.
Remark
This delegate function only supports one asset playout. Customers should implement theckcMessageWithID(spc:assetID:)when playback multistream in concurrency.Declaration
Swift
func ckcMessage(spc: Data) -> Data?Parameters
spcData The Server Playback Context (SPC) is the payload produced from AVFoundation.
Return Value
Data contains the Content Key Context (CKC) message.
-
ckcMessageWithID(spc:Default implementationassetID: ) Returns the Content Key Context (CKC) message from the server side that is used to decrypt the FairPlay stream.
Default Implementation
Declaration
Swift
func ckcMessageWithID(spc: Data, assetID: String) -> Data?Parameters
spcData The Server Playback Context (SPC) is the payload produced from AVFoundation.
assetIDcontentID from HLS Playlist. Multi playback should depend on the value to request different license.
Return Value
Data contains the Content Key Context (CKC) message.
-
ckcMessageWith(spc:Default implementationassetID: session: keyRequest: ) Returns the Content Key Context (CKC) message from the server side that is used to decrypt the FairPlay stream.
Remark
In deployments where Secure Session Management is enforced by a short duration FPS license (“license-renew”), the session and keyRequest values may be saved and later used to trigger renewal of the expiring license using:keySession.renewExpiringResponseData(for: keyRequest)Default Implementation
Declaration
Swift
func ckcMessageWith(spc: Data, assetID: String, session: AVContentKeySession, keyRequest: AVContentKeyRequest) -> Data?Parameters
spcData The Server Playback Context (SPC) is the payload produced from AVFoundation.
assetIDcontentID from HLS Playlist. Multi playback should depend on the value to request different license.
sessionthe AVContentKeySession for which the CKC is required
keyRequestthe originating AVContentKeyRequest
Return Value
Data contains the Content Key Context (CKC) message.
OTVLicenseDelegate Protocol Reference