Open Soft-Buddy opened 4 months ago
Thanks for your question. I'm not talking from experience in the sense that I'd have done this myself. The follwoing is kust about the APIs as far as I understand it from the documentation. Somereaders may be much better informaed about how the Cast SDK or devices on which cast is running support Dash with DRM.
As far as I understand from the Cast documentation there are two types of DASH streams with DRM that are supported.
The first type has all the information in the manifest and just works.
The second type need a licence URI that need to be passed from the sender (the Android app with CastPlayer
) to the receivever. The receiver then needs to get the licence URI from the load request and set it accordingly with a PlaybackRequest
updated accordingly. Latter is something that needs to be done on your receiver side, I can't help you with this due to lack of knowledge and experience.
As the snippet in [1] shows, you can pass the licence in any way your receiver understands. DefaultMeidItemConverter
adds any DRM information that are part of the Media3 MediaItem
in the JSON document that it writes to the custom data of the cast media item. You can reuse that and get the DRM info from that JSON. As an altarnative, you can write your own MediaItemConverter
and pass it to the constructor of CastPlayer
. There you can then convert the DRM linces into the cast item in a diffeent way if this is required.
It' important to note that your receiver needs to understand this, get the data from the load request (like from the JSON do in the custom data ) and do what's documented in [1].
I hope this helps as a starting point. There are users here that read this that have more experience with DRM on cast devices I guess. If you are lucky someone shares with you from their DASH with DRM on cast devices. Else [1] and [2] are the Cast/DASH/DRM resources I was using to respond to your question.
[1] https://developers.google.com/cast/docs/media/streaming_protocols#drm [2] https://developers.google.com/cast/docs/media/streaming_protocols#dynamic_adaptive_streaming_over_http_dash
I'm using
ExoPlayer
andCastPlayer
in my app. I managed to configureClearKey
drm for my Dash stream and got it working inExoPlayer
. I want to ask if there's any way to configureClearKey
drm for CastPlayer?