Using a Google Cast V3/CAF receiver, I would like to perform a network request before each DRM license request and include some of the resulting info (entitlement info) in the license request, as a header.
The Cast framework provides PlaybackConfig.licenseRequestHandler
which allows you to modify a license request before it is made, but it doesn't allow you to perform an async operation before the request - i.e. you can't return a Javascript Promise from licenseRequestHandler
.
This answer is doing something similar, but that won't work for live streams since that solution resets licenseRequestHandler
each time the manifest is loaded, and the manifest is loaded continuously during live streaming. I want to perform this pre-license async operation before license requests only, not every time the manifest is loaded.