ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

MediaDrmStateException: Failed to get property: Unsupported scheme or data format

Open sergejsha opened this issue 9 years ago • 2 comments

ExoPlayer r1.5.12

We check "securityLevel" as shown below to identify whether HD content filter shall be applied in the a DashTrackSelector or not. We use Widevine DRM.

When calling

drmSessionManager.getPropertyString("securityLevel");

we receive

Fatal Exception: android.media.MediaDrm$MediaDrmStateException: Failed to get property: Unsupported scheme or data format

at android.media.MediaDrm.getPropertyString(MediaDrm.java)
       at com.google.android.exoplayer.drm.FrameworkMediaDrm.getPropertyString(SourceFile:126)
       at com.google.android.exoplayer.drm.StreamingDrmSessionManager.getPropertyString(SourceFile:271)
       at my.company.core.player.exo.StreamingDashRendererBuilder$StreamingAsyncRendererBuilder.getWidevineSecurityLevel(SourceFile:77)

on some devices like

Lenovo K3 Note
Hisilicon24 Q10 Pro
Galaxy Note 8.0
Galaxy Tab A 9.7
Lenovo YB1-X90F

Is there any advices on how to handle this kind of exceptions? What I mean, if a device does not support "securityLevel" property, can it still play L1 protected content on this device? Is there a better way to check devices' L1 compatibility than using "securityLevel" property?

Any suggestions/ideas are warmly welcome. Thanks for great library!

sergejsha avatar Jul 21 '17 13:07 sergejsha

Iv'e had this issue since "always" (1.5.x). Had theories that there were something like timing issues on some devices (with MediaDrm that wasn't "finished" setting up or something), but nothing conclusive.

Solved it by wrapping the call in try/catch.

gvidda avatar Jul 24 '17 13:07 gvidda

To answer your question you are always able to play what content you desire on a device, it is up to the content provider to make the determination off of the device's profile at the time of playback., Glad you are able to work around the exception.

wvpaf avatar Aug 29 '17 22:08 wvpaf