Java 类com.google.android.exoplayer2.drm.MediaDrmCallback 实例源码

项目:ExoPlayer-Offline    文件:DashTest.java   
@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;
}
项目:transistor    文件:DashTestRunner.java   
@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);
  }
}
项目:no-player    文件:StreamingDrmSessionCreator.java   
StreamingDrmSessionCreator(MediaDrmCallback mediaDrmCallback, FrameworkMediaDrmCreator frameworkMediaDrmCreator, Handler handler) {
    this.mediaDrmCallback = mediaDrmCallback;
    this.frameworkMediaDrmCreator = frameworkMediaDrmCreator;
    this.handler = handler;
}
项目:ExoMedia    文件:NativeAudioPlayer.java   
@Override
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    //Purposefully left blank
}
项目:ExoMedia    文件:ExoAudioPlayer.java   
@Override
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    exoMediaPlayer.setDrmCallback(drmCallback);
}
项目:ExoMedia    文件:NativeTextureVideoView.java   
@Override
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    //Purposefully left blank
}
项目:ExoMedia    文件:NativeSurfaceVideoView.java   
@Override
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    //Purposefully left blank
}
项目:ExoMedia    文件:ExoTextureVideoView.java   
@Override
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    delegate.setDrmCallback(drmCallback);
}
项目:ExoMedia    文件:ExoSurfaceVideoView.java   
@Override
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    delegate.setDrmCallback(drmCallback);
}
项目:ExoMedia    文件:AudioPlayer.java   
/**
 * Sets the {@link MediaDrmCallback} to use when handling DRM for media.
 * This should be called before specifying the videos uri or path
 * <br>
 * <b>NOTE:</b> DRM is only supported on API 18 +
 *
 * @param drmCallback The callback to use when handling DRM media
 */
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    audioPlayerImpl.setDrmCallback(drmCallback);
}
项目:ExoMedia    文件:VideoView.java   
/**
 * Sets the {@link MediaDrmCallback} to use when handling DRM for media.
 * This should be called before specifying the videos uri or path
 * <br>
 * <b>NOTE:</b> DRM is only supported on API 18 +
 *
 * @param drmCallback The callback to use when handling DRM media
 */
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    videoViewImpl.setDrmCallback(drmCallback);
}
项目:ExoMedia    文件:VideoViewApi.java   
/**
 * Sets the {@link MediaDrmCallback} to use when handling DRM for media.
 * This should be called before specifying the videos uri or path
 * <br>
 * <b>NOTE:</b> DRM is only supported on API 18 +
 *
 * @param drmCallback The callback to use when handling DRM media
 */
void setDrmCallback(@Nullable MediaDrmCallback drmCallback);
项目:ExoMedia    文件:AudioPlayerApi.java   
/**
 * Sets the {@link MediaDrmCallback} to use when handling DRM for media.
 * This should be called before specifying the videos uri or path
 * <br>
 * <b>NOTE:</b> DRM is only supported on API 18 +
 *
 * @param drmCallback The callback to use when handling DRM media
 */
void setDrmCallback(@Nullable MediaDrmCallback drmCallback);
项目:ExoMedia    文件:ExoMediaPlayer.java   
/**
 * Sets the {@link MediaDrmCallback} to use when handling DRM for media.
 * This should be called before specifying the videos uri or path
 * <br>
 * <b>NOTE:</b> DRM is only supported on API 18 +
 *
 * @param drmCallback The callback to use when handling DRM media
 */
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    this.drmCallback = drmCallback;
}
项目:ExoMedia    文件:ExoVideoDelegate.java   
/**
 * Sets the {@link MediaDrmCallback} to use when handling DRM for media.
 * This should be called before specifying the videos uri or path
 * <br>
 * <b>NOTE:</b> DRM is only supported on API 18 +
 *
 * @param drmCallback The callback to use when handling DRM media
 */
public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) {
    exoMediaPlayer.setDrmCallback(drmCallback);
}