Package com.brightcove.player.drm
Class BrightcoveDrmUtil
- java.lang.Object
-
- com.brightcove.player.drm.BrightcoveDrmUtil
-
- Direct Known Subclasses:
DrmUtil
public class BrightcoveDrmUtil extends java.lang.Object
Provides utility methods to work DRM licenses.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BrightcoveDrmUtil()
Prevent construction of this utility class.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static android.util.Pair<java.lang.Long,java.lang.Long>
getLicenseDuration(BrightcoveDrmSession drmSession)
Deprecated.static long
getLongValue(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String key, long defaultValue)
Get the value of the specified key from the given map as a long primitive value.static long
getRemainingLicenseDuration(BrightcoveDrmSession drmSession)
Deprecated.static long
getRemainingPlaybackDuration(BrightcoveDrmSession drmSession)
Deprecated.
-
-
-
Method Detail
-
getLongValue
public static long getLongValue(java.util.Map<java.lang.String,java.lang.String> map, @NonNull java.lang.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.- 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_UNSET
if 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_UNSET
if the license duration is set, otherwise the duration as total of remaining seconds.
-
getLicenseDuration
@Deprecated public static android.util.Pair<java.lang.Long,java.lang.Long> getLicenseDuration(BrightcoveDrmSession drmSession)
Deprecated.Returns license and playback durations remaining in seconds.- Parameters:
drmSession
- reference to the DRM session.- Returns:
- A
Pair
consisting of the remaining license and playback durations in seconds. - Throws:
java.lang.IllegalStateException
- If called when a session isn't opened.
-
-