Package com.castlabs.sdk.drm
Class DrmDeviceTimeCheckerPlugin
- java.lang.Object
-
- com.castlabs.android.Plugin
-
- com.castlabs.sdk.drm.DrmDeviceTimeCheckerPlugin
-
public class DrmDeviceTimeCheckerPlugin extends Plugin
This plugin will perform periodic checks related to DRM licensing. In order to workaround a Widevine limitation this plugin performs some time-related checks while playing protected content. The limitation lies in changing the local device time in order to trick the DRM Content Decryption Module (CDM). If the license is expired, the plugin will stop playback and throw a fatal exception (CastlabsPlayerException.SEVERITY_ERROR
) of typeCastlabsPlayerException.TYPE_KEY_EXPIRED
. Before you can use this plugin, you need to register it with thePlayerSDK
before you initialize the SDK itself. For example:PlayerSDK.register(new DrmDeviceTimeCheckerPlugin()); // ... PlayerSDK.init(getApplicationContext());
DEFAULT_CHECK_INTERVAL_SEC
).// ... PlayerSDK.register(new DrmDeviceTimeCheckerPlugin(60)); // Check every minute // ...
- Since:
- 4.2.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CHECK_INTERVAL_SEC
Default value for the time in between checks
-
Constructor Summary
Constructors Constructor Description DrmDeviceTimeCheckerPlugin()
Same as callingDrmDeviceTimeCheckerPlugin(int)
withDEFAULT_CHECK_INTERVAL_SEC
DrmDeviceTimeCheckerPlugin(int checkIntervalSec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
void
init(Context context)
-
Methods inherited from class com.castlabs.android.Plugin
onRemotePlay
-
-
-
-
Field Detail
-
DEFAULT_CHECK_INTERVAL_SEC
public static final int DEFAULT_CHECK_INTERVAL_SEC
Default value for the time in between checks- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DrmDeviceTimeCheckerPlugin
public DrmDeviceTimeCheckerPlugin()
Same as callingDrmDeviceTimeCheckerPlugin(int)
withDEFAULT_CHECK_INTERVAL_SEC
-
DrmDeviceTimeCheckerPlugin
public DrmDeviceTimeCheckerPlugin(int checkIntervalSec)
- Parameters:
checkIntervalSec
- How often will the check be performed
-
-