Added
- Support
SignedDrmCertificate
andSignedMessages
messages inCdm.encrypt_client_id()
. This is mainly as a
convenience for any scripts wanting to encrypt their Client ID with a service certificate manually. - All License Keys from Serve's
/keys
endpoint can now be received by providingALL
as the key type.- This adds support for systems needing more than two types of keys from the license, e.g., Netflix MSL.
- For faster response times it is best to still ask for only
CONTENT
keys if that's all you need.
- Serve now has a
/close
endpoint to close a session. All clients should close the session once they are finished
with it or the user will eventually hit a limit of 50 sessions per user and the server will hog memory til it
restarts. - Serve now verifies that all Devices in config actually exist before starting the server.
- Serve now responds with a
Server
header denoting that pywidevine serve is being used, and it's version.- This allows Clients to selectively support APIs based on version; verify the API as being supported.
Changed
- Lessened version pin on
lxml
from^4.9.1
to>=4.8.0
to support projects using pycaption. - Service Certificate is now saved in the session as a
SignedMessage
with aSignedDrmCertificate
instead of the raw
DrmCertificate
. TheSignedMessage
is unsigned as theSignedDrmCertificate
within it, is signed. This is so
anything inheriting or using the Cdm (e.g.,serve
) can verify the certificate down the chain and keep it signed. - Serve now constructs one Cdm object for each user+device combination so one user cannot fill or overuse the CDM
session limit. - All of Serve's endpoints now have a
/{device}
prefix. E.g., instead of/challenge/STREAMING
, it's now
/device_name/challenge/STREAMING
. This is to support the previous change.
Fixed
- Handle server crash when the session limit is reached in Serve's
/open
endpoint by returning a 400 error. - Serve now correctly updates (or rather now makes a new Cdm object) if a user switches from one Device to another.
- Previously it would reuse an existing Cdm object, but would forget to switch device if they changed.
- Note: It does still leave the previous Cdm with the older Device in memory.
- Handle IOError when parsing bytes as MP4 Box to allow arbitrary data to be made as new boxes in
PSSH.get_as_box()
.