@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; }
@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); } }
StreamingDrmSessionCreator(MediaDrmCallback mediaDrmCallback, FrameworkMediaDrmCreator frameworkMediaDrmCreator, Handler handler) { this.mediaDrmCallback = mediaDrmCallback; this.frameworkMediaDrmCreator = frameworkMediaDrmCreator; this.handler = handler; }
@Override public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) { //Purposefully left blank }
@Override public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) { exoMediaPlayer.setDrmCallback(drmCallback); }
@Override public void setDrmCallback(@Nullable MediaDrmCallback drmCallback) { delegate.setDrmCallback(drmCallback); }
/** * 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); }
/** * 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); }
/** * 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);
/** * 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; }
/** * 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); }