Package com.google.android.exoplayer2.ext.opus

## Class OpusLibrary

- java.lang.Object
- - com.google.android.exoplayer2.ext.opus.OpusLibrary

-     public final class OpusLibrary
      extends Object

  Configures and queries the underlying native library.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static String` | `getVersion()` | Returns the version of the underlying library if available, or null otherwise.
    `static boolean` | `isAvailable()` | Returns whether the underlying library is available, loading it if necessary.
    `static boolean` | `matchesExpectedExoMediaCryptoType​(Class<? extends ExoMediaCrypto> exoMediaCryptoType)` | Returns whether the given `ExoMediaCrypto` type matches the one required for decoding protected content.
    `static String` | `opusGetVersion()` |
    `static boolean` | `opusIsSecureDecodeSupported()` |
    `static void` | `setLibraries​(Class<? extends ExoMediaCrypto> exoMediaCryptoType, String... libraries)` | Override the names of the Opus native libraries.

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

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

- - ### Method Detail

    - #### setLibraries

          public static void setLibraries​(Class<? extends ExoMediaCrypto> exoMediaCryptoType,
                                          String... libraries)

      Override the names of the Opus native libraries. If an application wishes to call this method, it must do so before calling any other method defined by this class, and before instantiating a `LibopusAudioRenderer` instance.
      Parameters:
        `exoMediaCryptoType` - The `ExoMediaCrypto` type expected for decoding protected content.
        `libraries` - The names of the Opus native libraries.

    - #### isAvailable

          public static boolean isAvailable()

      Returns whether the underlying library is available, loading it if necessary.

    - #### getVersion

          @Nullable
          public static String getVersion()

      Returns the version of the underlying library if available, or null otherwise.

    - #### matchesExpectedExoMediaCryptoType

          public static boolean matchesExpectedExoMediaCryptoType​(Class<? extends ExoMediaCrypto> exoMediaCryptoType)

      Returns whether the given `ExoMediaCrypto` type matches the one required for decoding protected content.

    - #### opusGetVersion

          public static String opusGetVersion()

    - #### opusIsSecureDecodeSupported

          public static boolean opusIsSecureDecodeSupported()