我正在构建一个自定义接收器,它通过从发送者接收自定义元数据来播放 DRM 内容。但是接收者只能播放第一个块,然后通过在 chromecast 控制台上显示以下消息与发送者断开连接。
[180.456s] [cast.framework.media.ShakaPlayer] category: 3 code: 3017
cast_receiver_framework.js:113 [180.509s] [cast.receiver.MediaManager] Sending error message to *:*
cast_receiver_framework.js:113 [180.543s] [cast.framework.media.Player] player event: error
cast_receiver_framework.js:113 [180.547s] [cast.receiver.MediaManager] Sending error message to *:*
我已使用自定义数据和 Widevine url 从基于 Web 的发送者和接收者解密内容发送加密的破折号文件。我的接收器看起来像:
const context = cast.framework.CastReceiverContext.getInstance();
const playerManager = context.getPlayerManager();
const playbackConfig = new cast.framework.PlaybackConfig();
playbackConfig.licenseUrl = "<licecence server key>/";
playbackConfig.protectionSystem = cast.framework.ContentProtection.WIDEVINE;
playbackConfig.licenseRequestHandler = requestInfo => {
requestInfo.headers = {
"Content-Type": "application/dash+xml",
customdata:
"<custom data>"
};
return playbackConfig;
};
context.getPlayerManager().setMediaPlaybackInfoHandler((loadRequest, playbackConfig) => {
if (loadRequest.media.customData && loadRequest.media.customData.licenseUrl) {
playbackConfig.licenseUrl = loadRequest.media.customData.licenseUrl;
}
return playbackConfig;
});
context.start({ playbackConfig: playbackConfig });
可能是什么问题?