Skip to content

Widevine compatibility #4654

Answered by phillipseamore
gilmotta asked this question in Q&A
Discussion options

You must be logged in to vote

https://developer.android.com/reference/android/webkit/PermissionRequest#RESOURCE_PROTECTED_MEDIA_ID

From a comment on another site it seems that:

An Android webview doesn’t support DRM by default. You need to override onPermissionRequest in the webview’s WebChromeClient, something like

 public void onPermissionRequest(PermissionRequest request) {
   // Crude example, you need to check which permissions were requested 
   String[] perms = {PermissionRequest.RESOURCE_PROTECTED_MEDIA_ID};
   request.grant(perms);
 }

Even then you may find support varies by device.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by robwalch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants