@UnstableApi
public final class WidevineUtil


Utility methods for Widevine.

Summary

Constants

static final String
PROPERTY_LICENSE_DURATION_REMAINING = "LicenseDurationRemaining"

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

static final String
PROPERTY_PLAYBACK_DURATION_REMAINING = "PlaybackDurationRemaining"

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

Public methods

static @Nullable Pair<LongLong>

Returns license and playback durations remaining in seconds.

Constants

PROPERTY_LICENSE_DURATION_REMAINING

public static final String PROPERTY_LICENSE_DURATION_REMAINING = "LicenseDurationRemaining"

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

PROPERTY_PLAYBACK_DURATION_REMAINING

public static final String PROPERTY_PLAYBACK_DURATION_REMAINING = "PlaybackDurationRemaining"

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

Public methods

getLicenseDurationRemainingSec

public static @Nullable Pair<LongLonggetLicenseDurationRemainingSec(DrmSession drmSession)

Returns license and playback durations remaining in seconds.

Parameters
DrmSession drmSession

The drm session to query.

Returns
@Nullable Pair<LongLong>

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.