• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java HttpMediaDrmCallback类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.google.android.exoplayer2.drm.HttpMediaDrmCallback的典型用法代码示例。如果您正苦于以下问题:Java HttpMediaDrmCallback类的具体用法?Java HttpMediaDrmCallback怎么用?Java HttpMediaDrmCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

HttpMediaDrmCallback类属于com.google.android.exoplayer2.drm包,在下文中一共展示了HttpMediaDrmCallback类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildDrmSessionManager

点赞 3

import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; //导入依赖的package包/类
@Override
protected final DefaultDrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManager(
    final String userAgent) {
  DefaultDrmSessionManager<FrameworkMediaCrypto> drmSessionManager = null;
  if (parameters.isWidevineEncrypted) {
    try {
      MediaDrmCallback drmCallback = new HttpMediaDrmCallback(parameters.widevineLicenseUrl,
          new DefaultHttpDataSourceFactory(userAgent));
      drmSessionManager = DefaultDrmSessionManager.newWidevineInstance(drmCallback, null,
          null, null);
      if (!parameters.useL1Widevine) {
        drmSessionManager.setPropertyString(SECURITY_LEVEL_PROPERTY, WIDEVINE_SECURITY_LEVEL_3);
      }
      if (offlineLicenseKeySetId != null) {
        drmSessionManager.setMode(DefaultDrmSessionManager.MODE_PLAYBACK,
            offlineLicenseKeySetId);
      }
    } catch (UnsupportedDrmException e) {
      throw new IllegalStateException(e);
    }
  }
  return drmSessionManager;
}
 

开发者ID:ashwanijanghu,
项目名称:ExoPlayer-Offline,
代码行数:24,
代码来源:DashTest.java

示例2: buildDrmSessionManager

点赞 3

import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; //导入依赖的package包/类
@Override
protected DefaultDrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManager(
    final String userAgent) {
  if (widevineLicenseUrl == null) {
    return null;
  }
  try {
    MediaDrmCallback drmCallback = new HttpMediaDrmCallback(widevineLicenseUrl,
        new DefaultHttpDataSourceFactory(userAgent));
    DefaultDrmSessionManager<FrameworkMediaCrypto> drmSessionManager =
        DefaultDrmSessionManager.newWidevineInstance(drmCallback, null, null, null);
    if (!useL1Widevine) {
      drmSessionManager.setPropertyString(
          SECURITY_LEVEL_PROPERTY, WIDEVINE_SECURITY_LEVEL_3);
    }
    if (offlineLicenseKeySetId != null) {
      drmSessionManager.setMode(DefaultDrmSessionManager.MODE_PLAYBACK,
          offlineLicenseKeySetId);
    }
    return drmSessionManager;
  } catch (UnsupportedDrmException e) {
    throw new IllegalStateException(e);
  }
}
 

开发者ID:y20k,
项目名称:transistor,
代码行数:25,
代码来源:DashTestRunner.java

示例3: buildDrmSessionManager

点赞 2

import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; //导入依赖的package包/类
private DrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManager(UUID uuid,
                                                                       String licenseUrl, Map<String, String> keyRequestProperties) throws UnsupportedDrmException {
    if (Util.SDK_INT < 18) {
        return null;
    }
    HttpMediaDrmCallback drmCallback = new HttpMediaDrmCallback(licenseUrl,
            buildHttpDataSourceFactory(false), keyRequestProperties);
    return new DefaultDrmSessionManager<>(uuid,
            FrameworkMediaDrm.newInstance(uuid), drmCallback, null, mainHandler, eventLogger);
}
 

开发者ID:ashwanijanghu,
项目名称:ExoPlayer-Offline,
代码行数:11,
代码来源:PlayerActivity.java

示例4: buildDrmSessionManager

点赞 2

import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; //导入依赖的package包/类
private DrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManager(UUID uuid,
                                                                       String licenseUrl, Map<String, String> keyRequestProperties) throws UnsupportedDrmException {
    if (Util.SDK_INT < 18) {
        return null;
    }
    HttpMediaDrmCallback drmCallback = new HttpMediaDrmCallback(licenseUrl,
            buildHttpDataSourceFactory(false), keyRequestProperties);
    return new StreamingDrmSessionManager<>(uuid,
            FrameworkMediaDrm.newInstance(uuid), drmCallback, null, mainHandler, eventLogger);
}
 

开发者ID:AndroidTips,
项目名称:MDVideo,
代码行数:11,
代码来源:PlayerActivityV2.java

示例5: buildDrmSessionManager

点赞 2

import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; //导入依赖的package包/类
private DrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManager(UUID uuid,
                                                                       String licenseUrl, Map<String, String> keyRequestProperties) throws UnsupportedDrmException {
  if (Util.SDK_INT < 18) {
    return null;
  }
  HttpMediaDrmCallback drmCallback = new HttpMediaDrmCallback(licenseUrl,
      buildHttpDataSourceFactory(false), keyRequestProperties);
  return new StreamingDrmSessionManager<>(uuid,
      FrameworkMediaDrm.newInstance(uuid), drmCallback, null, mainHandler, eventLogger);
}
 

开发者ID:TakumaMochizuki,
项目名称:Komica,
代码行数:11,
代码来源:PlayerActivity.java

示例6: buildDrmSessionManagerV18

点赞 2

import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; //导入依赖的package包/类
private DrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManagerV18(UUID uuid,
    String licenseUrl, String[] keyRequestPropertiesArray, boolean multiSession)
    throws UnsupportedDrmException {
  HttpMediaDrmCallback drmCallback = new HttpMediaDrmCallback(licenseUrl,
      buildHttpDataSourceFactory(false));
  if (keyRequestPropertiesArray != null) {
    for (int i = 0; i < keyRequestPropertiesArray.length - 1; i += 2) {
      drmCallback.setKeyRequestProperty(keyRequestPropertiesArray[i],
          keyRequestPropertiesArray[i + 1]);
    }
  }
  return new DefaultDrmSessionManager<>(uuid, FrameworkMediaDrm.newInstance(uuid), drmCallback,
      null, mainHandler, eventLogger, multiSession);
}
 

开发者ID:y20k,
项目名称:transistor,
代码行数:15,
代码来源:PlayerActivity.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)