android.media.MediaDrm.KeyRequest Java Examples
The following examples show how to use
android.media.MediaDrm.KeyRequest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StreamingDrmSessionManager.java From Exoplayer_VLC with Apache License 2.0 | 6 votes |
@Override public void handleMessage(Message msg) { Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) msg.obj); break; case MSG_KEYS: response = callback.executeKeyRequest(uuid, (KeyRequest) msg.obj); break; default: throw new RuntimeException(); } } catch (Exception e) { response = e; } postResponseHandler.obtainMessage(msg.what, response).sendToTarget(); }
Example #2
Source File: SmoothStreamingTestMediaDrmCallback.java From Exoplayer_VLC with Apache License 2.0 | 5 votes |
@Override public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws Exception { String url = request.getDefaultUrl(); if (TextUtils.isEmpty(url)) { url = PLAYREADY_TEST_DEFAULT_URI; } return DemoUtil.executePost(url, request.getData(), KEY_REQUEST_PROPERTIES); }
Example #3
Source File: WidevineTestMediaDrmCallback.java From Exoplayer_VLC with Apache License 2.0 | 5 votes |
@Override public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws IOException { String url = request.getDefaultUrl(); if (TextUtils.isEmpty(url)) { url = defaultUri; } return DemoUtil.executePost(url, request.getData(), null); }
Example #4
Source File: StreamingDrmSessionManager.java From Exoplayer_VLC with Apache License 2.0 | 5 votes |
private void postKeyRequest() { KeyRequest keyRequest; try { keyRequest = mediaDrm.getKeyRequest(sessionId, schemePsshData, mimeType, MediaDrm.KEY_TYPE_STREAMING, optionalKeyRequestParameters); postRequestHandler.obtainMessage(MSG_KEYS, keyRequest).sendToTarget(); } catch (NotProvisionedException e) { onKeysError(e); } }
Example #5
Source File: WidevineTestMediaDrmCallback.java From Mobilyzer with Apache License 2.0 | 5 votes |
@Override public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws IOException { String url = request.getDefaultUrl(); if (TextUtils.isEmpty(url)) { url = defaultUri; } return DemoUtil.executePost(url, request.getData(), null); }
Example #6
Source File: WidevineTestMediaDrmCallback.java From google-media-framework-android with Apache License 2.0 | 5 votes |
@Override public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws IOException { String url = request.getDefaultUrl(); if (TextUtils.isEmpty(url)) { url = defaultUri; } return ExoplayerUtil.executePost(url, request.getData(), null); }