我正在开发自己的自定义接收器应用程序,并且我想播放的流受到 Widevine 的保护,我需要从自己的服务器获取许可证,并且需要传递 content_id 和有效负载。这是我的代码:
playbackConfig.protectionSystem = cast.framework.ContentProtection.WIDEVINE;
playbackConfig.licenseRequestHandler = requestInfo => {
requestInfo.headers["Authorization"] = token;
requestInfo.headers["Content-Type"] = "application/json";
requestInfo.content = JSON.stringify({
type: "widevine",
type_request: "license",
content_id: content_id,
payload: <<missing_data>>
});
return requestInfo
};
我在 Android 上实现了它,实现了我自己的 MediaDrmCallback,并且 KeyRequest 类包含所需的信息,但对象 requestInfo 的参数内容不提供该信息