PlayreadyCdmApi

interface PlayreadyCdmApi

The operations a PlayReady CDM offers, whether it runs in this process or behind an HTTP server.

PlayreadyCdm implements this locally; ktprd-remote's RemotePlayreadyCdm implements it against a pyplayready-compatible server, so callers can swap one for the other.

This mirrors ktvine's CdmApi in shape — suspending throughout, sessions addressed by an okio ByteString — but not in signature: a PlayReady challenge is a SOAP document rather than a protobuf message, and there is no privacy mode or service certificate in this protocol.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun close(sessionId: ByteString)

Close a session and release its slot.

Link copied to clipboard
abstract suspend fun getKeys(sessionId: ByteString): List<PlayreadyKey>

The decrypted keys for the session.

Link copied to clipboard
abstract suspend fun getLicenseChallenge(sessionId: ByteString, wrmHeader: WrmHeader, revocationLists: List<Uuid>? = null): String

Build a signed license challenge for wrmHeader.

Link copied to clipboard
abstract suspend fun open(): ByteString

Open a session.

Link copied to clipboard
abstract suspend fun parseLicense(sessionId: ByteString, licenseMessage: String)

Verify and parse a license response, loading its keys into the session.