Package com.google.android.exoplayer2.drm

## Class WidevineUtil

- java.lang.Object
- - com.google.android.exoplayer2.drm.WidevineUtil

-     public final class WidevineUtil
      extends Object

  Utility methods for Widevine.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `PROPERTY_LICENSE_DURATION_REMAINING` | Widevine specific key status field name for the remaining license duration, in seconds.
    `static String` | `PROPERTY_PLAYBACK_DURATION_REMAINING` | Widevine specific key status field name for the remaining playback duration, in seconds.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Pair<Long,​Long>` | `getLicenseDurationRemainingSec​(DrmSession drmSession)` | Returns license and playback durations remaining in seconds.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROPERTY_LICENSE_DURATION_REMAINING

          public static final String PROPERTY_LICENSE_DURATION_REMAINING

      Widevine specific key status field name for the remaining license duration, in seconds.
      See Also:
        Constant Field Values

    - #### PROPERTY_PLAYBACK_DURATION_REMAINING

          public static final String PROPERTY_PLAYBACK_DURATION_REMAINING

      Widevine specific key status field name for the remaining playback duration, in seconds.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getLicenseDurationRemainingSec

          @Nullable
          public static Pair<Long,​Long> getLicenseDurationRemainingSec​(DrmSession drmSession)

      Returns license and playback durations remaining in seconds.
      Parameters:
        `drmSession` - The drm session to query.
      Returns:
        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.