@UnstableApi
class WidevineUtil


Utility methods for Widevine.

Summary

Constants

const String!
PROPERTY_LICENSE_DURATION_REMAINING = "LicenseDurationRemaining"

Widevine specific key status field name for the remaining license duration, in seconds.

const String!
PROPERTY_PLAYBACK_DURATION_REMAINING = "PlaybackDurationRemaining"

Widevine specific key status field name for the remaining playback duration, in seconds.

Public functions

java-static Pair<Long!, Long!>?

Returns license and playback durations remaining in seconds.

Constants

PROPERTY_LICENSE_DURATION_REMAINING

const val PROPERTY_LICENSE_DURATION_REMAINING = "LicenseDurationRemaining": String!

Widevine specific key status field name for the remaining license duration, in seconds.

PROPERTY_PLAYBACK_DURATION_REMAINING

const val PROPERTY_PLAYBACK_DURATION_REMAINING = "PlaybackDurationRemaining": String!

Widevine specific key status field name for the remaining playback duration, in seconds.

Public functions

getLicenseDurationRemainingSec

java-static fun getLicenseDurationRemainingSec(drmSession: DrmSession!): Pair<Long!, Long!>?

Returns license and playback durations remaining in seconds.

Parameters
drmSession: DrmSession!

The drm session to query.

Returns
Pair<Long!, Long!>?

A Pair consisting of the remaining license and playback durations in seconds, or null if called before the session has been opened or after it's been released.