Package com.brightcove.player.drm
Class BrightcoveDrmUtil
java.lang.Object
com.brightcove.player.drm.BrightcoveDrmUtil
- Direct Known Subclasses:
DrmUtil
Provides utility methods to work DRM licenses.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrevent construction of this utility class. -
Method Summary
Modifier and TypeMethodDescriptiongetLicenseDuration(BrightcoveDrmSession drmSession) Deprecated.static longgetLongValue(Map<String, String> map, String key, long defaultValue) Get the value of the specified key from the given map as a long primitive value.static longgetRemainingLicenseDuration(BrightcoveDrmSession drmSession) Deprecated.static longgetRemainingPlaybackDuration(BrightcoveDrmSession drmSession) Deprecated.
-
Constructor Details
-
BrightcoveDrmUtil
protected BrightcoveDrmUtil()Prevent construction of this utility class.
-
-
Method Details
-
getLongValue
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.- Returns:
- the long value.
-
getRemainingLicenseDuration
@Deprecated public static long getRemainingLicenseDuration(@NonNull BrightcoveDrmSession drmSession) Deprecated.Finds the total number of remaining seconds that the DRM license is valid.- Parameters:
drmSession- reference to the DRM session.- Returns:
Constants.TIME_UNSETif the license duration is set, otherwise the duration as total of remaining seconds.
-
getRemainingPlaybackDuration
@Deprecated public static long getRemainingPlaybackDuration(@NonNull BrightcoveDrmSession drmSession) Deprecated.Finds the total number of remaining seconds that the DRM license is valid for playback.- Parameters:
drmSession- reference to the DRM session.- Returns:
Constants.TIME_UNSETif the license duration is set, otherwise the duration as total of remaining seconds.
-
getLicenseDuration
@Deprecated public static android.util.Pair<Long,Long> getLicenseDuration(BrightcoveDrmSession drmSession) Deprecated.Returns license and playback durations remaining in seconds.- Parameters:
drmSession- reference to the DRM session.- Returns:
- A
Pairconsisting of the remaining license and playback durations in seconds. - Throws:
IllegalStateException- If called when a session isn't opened.
-