本文整理汇总了Java中android.media.NotProvisionedException类的典型用法代码示例。如果您正苦于以下问题:Java NotProvisionedException类的具体用法?Java NotProvisionedException怎么用?Java NotProvisionedException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NotProvisionedException类属于android.media包,在下文中一共展示了NotProvisionedException类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getKeyRequest
import android.media.NotProvisionedException; //导入依赖的package包/类
@Override
public KeyRequest getKeyRequest(byte[] scope, byte[] init, String mimeType, int keyType,
HashMap<String, String> optionalParameters) throws NotProvisionedException {
final MediaDrm.KeyRequest request = mediaDrm.getKeyRequest(scope, init, mimeType, keyType,
optionalParameters);
return new KeyRequest() {
@Override
public byte[] getData() {
return request.getData();
}
@Override
public String getDefaultUrl() {
return request.getDefaultUrl();
}
};
}
示例2: postKeyRequest
import android.media.NotProvisionedException; //导入依赖的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: onKeysError
import android.media.NotProvisionedException; //导入依赖的package包/类
private void onKeysError(Exception e) {
if (e instanceof NotProvisionedException) {
postProvisionRequest();
} else {
onError(e);
}
}
示例4: postKeyRequest
import android.media.NotProvisionedException; //导入依赖的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);
}
}
示例5: postKeyRequest
import android.media.NotProvisionedException; //导入依赖的package包/类
private void postKeyRequest() {
KeyRequest keyRequest;
try {
keyRequest = mediaDrm.getKeyRequest(sessionId, schemeData.data, schemeData.mimeType,
MediaDrm.KEY_TYPE_STREAMING, optionalKeyRequestParameters);
postRequestHandler.obtainMessage(MSG_KEYS, keyRequest).sendToTarget();
} catch (NotProvisionedException e) {
onKeysError(e);
}
}
示例6: postKeyRequest
import android.media.NotProvisionedException; //导入依赖的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);
}
}
示例7: onKeysError
import android.media.NotProvisionedException; //导入依赖的package包/类
private void onKeysError(Exception e) {
if (e instanceof NotProvisionedException) {
provisioningManager.provisionRequired(this);
} else {
onError(e);
}
}
示例8: getKeyRequest
import android.media.NotProvisionedException; //导入依赖的package包/类
@Override
public KeyRequest getKeyRequest(byte[] scope, byte[] init, String mimeType, int keyType,
HashMap<String, String> optionalParameters) throws NotProvisionedException {
final MediaDrm.KeyRequest request = mediaDrm.getKeyRequest(scope, init, mimeType, keyType,
optionalParameters);
return new DefaultKeyRequest(request.getData(), request.getDefaultUrl());
}
示例9: postKeyRequest
import android.media.NotProvisionedException; //导入依赖的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);
}
}
示例10: getOfflineKeyRequest
import android.media.NotProvisionedException; //导入依赖的package包/类
MediaDrm.KeyRequest getOfflineKeyRequest(byte[] initData, String mimeType) {
try {
return mMediaDrm.getKeyRequest(mSessionId, initData, mimeType, MediaDrm.KEY_TYPE_OFFLINE, null);
} catch (NotProvisionedException e) {
throw new WidevineNotSupportedException(e);
}
}
示例11: provideKeyResponse
import android.media.NotProvisionedException; //导入依赖的package包/类
byte[] provideKeyResponse(byte[] keyResponse) throws DeniedByServerException {
try {
return mMediaDrm.provideKeyResponse(mSessionId, keyResponse);
} catch (NotProvisionedException e) {
throw new WidevineNotSupportedException(e);
}
}
示例12: openSession
import android.media.NotProvisionedException; //导入依赖的package包/类
@Override
public byte[] openSession() throws NotProvisionedException, ResourceBusyException {
return mediaDrm.openSession();
}
示例13: provideKeyResponse
import android.media.NotProvisionedException; //导入依赖的package包/类
@Override
public byte[] provideKeyResponse(byte[] scope, byte[] response)
throws NotProvisionedException, DeniedByServerException {
return mediaDrm.provideKeyResponse(scope, response);
}