0
votes

I am building a custom receiver which plays the DRM content by receiveing the custom metadata from sender. But receiver is only able to play the first chunk and then disconnected from sender by showing following messages at chromecast console.

[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 *:* 

I have send encryted dash files from web based sender and receiver decrypt content using the custom data and widevine url. My receiver looks like:

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 });

What may be the issue ?

1

1 Answers

0
votes

Maybe I am late but since your playback runs for sometime and stops, this is mostly DRM call related problem. I see "Content-Type": "application/dash+xml" this should not be the correct value of header. application/dash+xml is the value of content type. Plus check if DRM call returning 200 in Network logs.