androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.73k stars 414 forks source link

default_KID missing support #1766

Open newtestpage opened 1 month ago

newtestpage commented 1 month ago

Hi ,

I hope this message finds you well. I am writing to request the addition of support in ExoPlayer for MPD (DASH) files that do not include the default_KID attribute when using ClearKey protection (urn:mpeg:dash:mp4protection:2011).

Currently, many web players, including Shaka Player and JWPlayer, already support such MPD files, making it easier to play a wide range of DRM-protected content. However, ExoPlayer throws an error when trying to play these files due to the missing default_KID attribute. It would be extremely helpful if ExoPlayer could handle such cases as well, to ensure compatibility with more content providers and existing media streams.

Thanks

icbaker commented 1 month ago

Thanks for the request.

The DASH-IF IOP requires the default_KID attribute to be present in the manifest - see section 7.7.2:

The MPD @cenc:default_KID attribute SHALL match the ‘tenc’ default_KID value.

This is where ExoPlayer's expectation comes from.

In general we expect media to follow its spec, the DASH IOP is a de-facto spec for DASH that we often rely on media to follow in order to make parsing it tractable. Given this, we are unlikely to relax ExoPlayer's requirement here. I would suggest any media streams that aren't following the DASH-IF IOP should be updated to follow it, in order to ensure compatibility with as many consumers/players of DASH streams as possible.

newtestpage commented 4 weeks ago

Thank you for the clarification.

I understand the importance of following the DASH-IF IOP guidelines to ensure compatibility and parsing accuracy. However, given that a considerable number of streaming providers are using DASH streams without the default_KID attribute, would it be possible to consider an optional mode or flag in ExoPlayer that could allow these streams to play? This could help broaden compatibility, especially since other players like Shaka Player and JWPlayer already support such streams.

Thank you for considering this request, and I appreciate the ongoing improvements in ExoPlayer.