Package com.castlabs.android.drm
Interface DrmLicenseManager<T extends com.google.android.exoplayer2.drm.ExoMediaCrypto>
-
- All Superinterfaces:
com.google.android.exoplayer2.drm.DrmSessionManager<T>
public interface DrmLicenseManager<T extends com.google.android.exoplayer2.drm.ExoMediaCrypto> extends com.google.android.exoplayer2.drm.DrmSessionManager<T>Extension of theDrmSessionManagerthat also allows to load licenses headless and in one blocking function.- Since:
- 3.0.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close all sessionsvoidload(com.google.android.exoplayer2.drm.DrmInitData videoInitData, com.google.android.exoplayer2.drm.DrmInitData audioInitData)Pass in video and audio init data and trigger a license load.voidonComponentError(DrmLicenseManagerComponent drmTimingComponent, Exception exception)Called when aDrmLicenseManagerComponenttiggers an errorvoidremove()Removes the license matching the providedDrmConfiguration.
-
-
-
Method Detail
-
load
void load(com.google.android.exoplayer2.drm.DrmInitData videoInitData, com.google.android.exoplayer2.drm.DrmInitData audioInitData) throws ExceptionPass in video and audio init data and trigger a license load. Implementations of this method must operate in foreground- Parameters:
videoInitData- The video init dataaudioInitData- The audio init data- Throws:
Exception- in case an error is raised during the license request
-
remove
void remove() throws ExceptionRemoves the license matching the providedDrmConfiguration.Some DRM vendors, such as Widevine, require to perform a request to the DRM server in order to remove the internal key. This is why Internet connectivity may be required. Upon successful license removal, the license will also be removed from the
PlayerSDK.DEFAULT_KEY_STORE.In order to remove the license, it must exist in the
PlayerSDK.DEFAULT_KEY_STORE.- Throws:
Exception- in case an error is raised during the license removal
-
close
void close()
Close all sessions
-
onComponentError
void onComponentError(@NonNull DrmLicenseManagerComponent drmTimingComponent, @NonNull Exception exception)Called when aDrmLicenseManagerComponenttiggers an error- Parameters:
drmTimingComponent- component that is triggering this errorexception- exception thrown by the component
-
-