本文整理汇总了Java中android.media.MediaDrm.KeyRequest类的典型用法代码示例。如果您正苦于以下问题:Java KeyRequest类的具体用法?Java KeyRequest怎么用?Java KeyRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KeyRequest类属于android.media.MediaDrm包,在下文中一共展示了KeyRequest类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleMessage
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@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();
}
示例2: postKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
private void postKeyRequest() {
KeyRequest keyRequest;
try {
keyRequest = mediaDrm.getKeyRequest(sessionId, schemeInitData.data, schemeInitData.mimeType,
MediaDrm.KEY_TYPE_STREAMING, optionalKeyRequestParameters);
postRequestHandler.obtainMessage(MSG_KEYS, keyRequest).sendToTarget();
} catch (NotProvisionedException e) {
onKeysError(e);
}
}
示例3: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@Override
public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws Exception {
String url = request.getDefaultUrl();
if (TextUtils.isEmpty(url)) {
url = PLAYREADY_TEST_DEFAULT_URI;
}
return Util.executePost(url, request.getData(), KEY_REQUEST_PROPERTIES);
}
示例4: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@Override
public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws IOException {
String url = request.getDefaultUrl();
if (TextUtils.isEmpty(url)) {
url = defaultUri;
}
return Util.executePost(url, request.getData(), null);
}
示例5: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@Override
public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws Exception {
String url = request.getDefaultUrl();
if (TextUtils.isEmpty(url)) {
url = PLAYREADY_TEST_DEFAULT_URI;
}
return Util.executePost(url, request.getData(), KEY_REQUEST_PROPERTIES);
}
示例6: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@Override
public byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws IOException {
String url = request.getDefaultUrl();
if (TextUtils.isEmpty(url)) {
url = defaultUri;
}
return Util.executePost(url, request.getData(), null);
}
示例7: postKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
private void postKeyRequest() {
KeyRequest keyRequest;
try {
keyRequest = mediaDrm.getKeyRequest(sessionId, schemeData, mimeType,
MediaDrm.KEY_TYPE_STREAMING, optionalKeyRequestParameters);
postRequestHandler.obtainMessage(MSG_KEYS, keyRequest).sendToTarget();
} catch (NotProvisionedException e) {
onKeysError(e);
}
}
示例8: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@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);
}
示例9: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@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);
}
示例10: postKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
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);
}
}
示例11: postKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
private void postKeyRequest() {
KeyRequest keyRequest;
try {
keyRequest = mediaDrm.getKeyRequest(sessionId, schemePsshData, mimeType,
MediaDrm.KEY_TYPE_STREAMING, null);
postRequestHandler.obtainMessage(MSG_KEYS, keyRequest).sendToTarget();
} catch (NotProvisionedException e) {
onKeysError(e);
}
}
示例12: executeKeyRequest
import android.media.MediaDrm.KeyRequest; //导入依赖的package包/类
@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);
}