Add custom request headers while chrome casting

how can i add custom request headers to stream url while casting.

with the help of @Kishore i have solved adding custom request headers to manifest url. but while chrome casting it is not working. how can i add custom request headers to stream url while casting.

Hi @madhuy1729 , thanks for reaching out to Bitmovin community. The custom headers configured in DrmConfig (for DRM requests) are passed to CAF receiver as loadRequestData.media.customData.drm. Please see Bitmovin reference CAF receiver code on how to use this.

On similar lines if you need to pass custom HTTP headers for other network requests like playlists and segments, then you can send this along with LOAD request as custom metadata values as shared in Send custom metadata on a custom Chromecast receiver and then can use this in a custom CAF receiver for the respective network request. An example of this for DRM request is present in Bitmovin reference CAF receiver.

Similar concept can be used for Manifest requests using cast.framework.PlaybackConfig. manifestRequestHandler or for segment requests using cast.framework.PlaybackConfig. SegmentRequestHandler

Do let us know if above information helps address your use case and if there are any followup questions.