Package com.castlabs.android.player

# Class AudioAttributes.Builder

java.lang.Object
com.castlabs.android.player.AudioAttributes.Builder

Enclosing class:
  `AudioAttributes`

public static final class AudioAttributes.Builder extends Object
Builder for `AudioAttributes`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`
  Creates a new builder for `AudioAttributes`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AudioAttributes`
  `get()`
  Creates an `AudioAttributes` instance from this builder.
  `AudioAttributes.Builder`
  `setContentType(int contentType)`
  Sets the content type.
  `AudioAttributes.Builder`
  `setFlags(int flags)`
  Sets the flags.
  `AudioAttributes.Builder`
  `setUsage(int usage)`
  Sets the usage.

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

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

- ## Constructor Details

  - ### Builder

    public Builder()
    Creates a new builder for `AudioAttributes`.

    By default the content type is `C.CONTENT_TYPE_MOVIE`, usage is `C.USAGE_MEDIA`, and no flags are set.

- ## Method Details

  - ### setContentType

    public AudioAttributes.Builder setContentType(@AudioContentType int contentType)
    Sets the content type.
    Parameters:
      `contentType` - The content type.
    Returns:
      This builder.
    See Also:
      - `AudioAttributes.Builder.setContentType(int)`

  - ### setFlags

    public AudioAttributes.Builder setFlags(@AudioFlags int flags)
    Sets the flags.
    Parameters:
      `flags` - The flags.
    Returns:
      This builder.
    See Also:
      - `AudioAttributes.Builder.setFlags(int)`

  - ### setUsage

    public AudioAttributes.Builder setUsage(@AudioUsage int usage)
    Sets the usage.
    Parameters:
      `usage` - The usage.
    Returns:
      This builder.
    See Also:
      - `AudioAttributes.Builder.setUsage(int)`

  - ### get

    public AudioAttributes get()
    Creates an `AudioAttributes` instance from this builder.
    Returns:
      The `AudioAttributes` instance.