当前位置: 首页>>代码示例>>Java>>正文


Java KeyRequest类代码示例

本文整理汇总了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();
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:20,代码来源:StreamingDrmSessionManager.java

示例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);
  }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:11,代码来源:StreamingDrmSessionManager.java

示例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);
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:9,代码来源:SmoothStreamingTestMediaDrmCallback.java

示例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);
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:9,代码来源:WidevineTestMediaDrmCallback.java

示例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);
}
 
开发者ID:vuthanhict,项目名称:ExoPlayerController,代码行数:9,代码来源:SmoothStreamingTestMediaDrmCallback.java

示例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);
}
 
开发者ID:vuthanhict,项目名称:ExoPlayerController,代码行数:9,代码来源:WidevineTestMediaDrmCallback.java

示例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);
  }
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:11,代码来源:StreamingDrmSessionManager.java

示例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);
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:9,代码来源:SmoothStreamingTestMediaDrmCallback.java

示例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);
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:9,代码来源:WidevineTestMediaDrmCallback.java

示例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);
  }
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:11,代码来源:StreamingDrmSessionManager.java

示例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);
  }
}
 
开发者ID:edx,项目名称:edx-app-android,代码行数:11,代码来源:StreamingDrmSessionManager.java

示例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);
}
 
开发者ID:googleads,项目名称:google-media-framework-android,代码行数:9,代码来源:WidevineTestMediaDrmCallback.java


注:本文中的android.media.MediaDrm.KeyRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。