RemotePlayreadyCdm

class RemotePlayreadyCdm(client: HttpClient, baseUrl: String, deviceName: String, secret: String, expectedSecurityLevel: Int? = null) : PlayreadyCdmApi

A PlayreadyCdmApi backed by a pyplayready serve-compatible server.

The device's private keys never reach this process — every operation is an HTTP call, so one server can hold the devices while many clients use them.

The caller supplies the HttpClient, which keeps this module free of any engine choice:

val cdm = RemotePlayreadyCdm(
client = HttpClient(CIO),
baseUrl = "https://cdm.example.com",
deviceName = "my_playready_device",
secret = "your-api-key",
)

Parameters

baseUrl

the server root, with or without a trailing slash

deviceName

the device the server should use, as named in its config

secret

the value sent as the X-Secret-Key header

expectedSecurityLevel

if given, open rejects a server whose device reports a different security level

Constructors

Link copied to clipboard
constructor(client: HttpClient, baseUrl: String, deviceName: String, secret: String, expectedSecurityLevel: Int? = null)

Properties

Link copied to clipboard

Security level the server reports for deviceName. Populated by the first open.

Functions

Link copied to clipboard
open suspend override fun close(sessionId: ByteString)
Link copied to clipboard
open suspend override fun getKeys(sessionId: ByteString): List<PlayreadyKey>
Link copied to clipboard
open suspend override fun getLicenseChallenge(sessionId: ByteString, wrmHeader: WrmHeader, revocationLists: List<Uuid>?): String
Link copied to clipboard
open suspend override fun open(): ByteString
Link copied to clipboard
open suspend override fun parseLicense(sessionId: ByteString, licenseMessage: String)
Link copied to clipboard
suspend fun probe()

Check that baseUrl looks like a PlayReady CDM server.