Type of key
I'm using Exoplayer for playing Widevine protected movies. Almost everything works fine, but I need to change the value of parameter keyType, which is requested in method getKeyRequest of MediaDrm class. I found that key is set to KEY_TYPE_STREAMING. This is in the StreamingDrmSessionManger class. I need to change value to MediaDrm.KEY_TYPE_OFFLINE. Is there any way how can I do it? I didn't find any method, where I can pass this value. Now I see only one option - download whole project and using it instead of compile 'com.google.android.exoplayer:exoplayer...' in my gradle file. Is there any other option? Thank you.
If you're trying to implement offline drm playbacks, there's quite a lot more work to do than just changing the key type. You need to implement key release, add functionality to restore offline keys into MediaDrm sessions, and so on.
We're not supporting this case directly at this point in time, however if you need this functionality you can implement your own version of DrmSessionManager in your application code in order to achieve what you need.
Thank you for your response. I would like to ask some questions.
- Could you tell, please, if you are planning support of offline DRM playbacks in Exoplayer? If yes, do you know approximately when?
- Could you provide me some materials or examples, how can I do it? Because I don't have too much experience with this, I would like to know, how complicated is implementation of this feature. Maybe it will be better for me to wait until this feature will be standard part of Exoplayer (see 1. question).
- In my current implementation, I parse MPD file, download all video and audio segments, save them into the persistent storage of device and then I modify the location of segments in manifest to stored segments. This works fine, and now I only need to implement feature for acquiring offline type of DRM licence. Do you think that this is a correct approach?
Thank you in advance for you response and notes.
Is there any new progress of this topic? We're facing the same problem. Will this feature (offline downloading / functionality in DrmSessionManager) be standard part of Exoplayer in the near feature? Thank you for answer.