解决encryption - Decrypting widevine DRM protected video in android using MediaDrm
I am trying to decrypt widevine DRm protected media file using Android's MediaDrm API. But MediaDrm is instantiated using UUId( of DRM-scheme). Android developer site says
"App accesses the DRM-scheme-identifying UUID, typically from metadata in the content, and uses this UUID to construct an instance of a MediaDrm object that is able to support the DRM scheme required by the content". (www.developer.android.com/reference/android/media/MediaDrm.html).
So I tried to get UUID using MediaExtractor.getpsshInfo() but it returned a null object. Then I tried DrmManagerClient.getMetadata(uri of media content) but again this method also returned null.
I tried this on the follwing widevine demo uri:
although after aquiring rights using DrmManagerClient API I am able to play the video in Android's native MediaPLayer( VideoView) but I want to decrypt the media file using Android's MediaDrm API and want to get unencrypted data ,which I am not able to do because I am not getting proper UUID value. Can someone point me in the right direction to achieve this.
Or Can some one help me in accessing a DRM scheme - UUID value?
Thanksandroid encryption drm mediaextractor widevine
this question edited Jul 1 '14 at 12:40 asked Jul 1 '14 at 12:27 user1581813 3 1 4 I tried to integrate google widevine in android but failed. I didn't find any help or sample code for how to integrate it. Could you please guide me how to achieve that? Which information or id or access do I have to need to integrate it? I want to test widevine with your content URL. Please help. – Md Sufi Khan Aug 28 '14 at 7:26
mediaDRM is designed for EME Common Encryption playback. See https://developer.android.com/reference/android/media/MediaDrm.html
The Widevine content you have listed is not in the Common Encryption format and therefore, is incompatible.
this answer answered Jul 2 '14 at 0:37 user1581814 26 1
- 1Android 使WebView支持HTML5 Video（全屏）播放的方法
- 2html5 Video控件视频播放，电脑和手机上都能兼容。（mp4格式 电脑和android、ios都能播放）
- 3android webkit HTML5 video研究
- 4Android HTML5 Video视频标签自动播放与自动全屏问题解决
- 5android webview自动播放Video