-
public class BrightcoveDrmUtil
Provides utility methods to work DRM licenses.
-
-
Method Summary
Modifier and Type Method Description static long
getLongValue(Map<String, String> map, @NonNull() String key, long defaultValue)
Get the value of the specified key from the given map as a long primitive value. static long
getRemainingLicenseDuration(@NonNull() BrightcoveDrmSession drmSession)
Finds the total number of remaining seconds that the DRM license is valid. static long
getRemainingPlaybackDuration(@NonNull() BrightcoveDrmSession drmSession)
Finds the total number of remaining seconds that the DRM license is valid for playback. static Pair<Long, Long>
getLicenseDuration(BrightcoveDrmSession drmSession)
Returns license and playback durations remaining in seconds. -
-
Method Detail
-
getLongValue
static long getLongValue(Map<String, String> map, @NonNull() String key, long defaultValue)
Get the value of the specified key from the given map as a long primitive value.
- Parameters:
map
- reference to the map.key
- the unique name of the value to be read.defaultValue
- the value that should be returned if the value cannot be read.
-
getRemainingLicenseDuration
@Deprecated() static long getRemainingLicenseDuration(@NonNull() BrightcoveDrmSession drmSession)
Finds the total number of remaining seconds that the DRM license is valid.
- Parameters:
drmSession
- reference to the DRM session.
-
getRemainingPlaybackDuration
@Deprecated() static long getRemainingPlaybackDuration(@NonNull() BrightcoveDrmSession drmSession)
Finds the total number of remaining seconds that the DRM license is valid for playback.
- Parameters:
drmSession
- reference to the DRM session.
-
getLicenseDuration
@Deprecated() static Pair<Long, Long> getLicenseDuration(BrightcoveDrmSession drmSession)
Returns license and playback durations remaining in seconds.
- Parameters:
drmSession
- reference to the DRM session.
-
-
-
-