Package com.castlabs.sdk.mediasession

# Class SessionCallbackBuilder

java.lang.Object
com.castlabs.sdk.mediasession.SessionCallbackBuilder

public final class SessionCallbackBuilder extends Object
Builds a `MediaSession.SessionCallback` with various collaborators.

See Also:
  - `MediaSession.SessionCallback`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `SessionCallbackBuilder.AllowedCommandProvider`
  Provides allowed commands for `MediaController`.
  `static interface`
  `SessionCallbackBuilder.CustomCommandProvider`
  Callbacks for querying what custom commands are supported, and for handling a custom command when a controller sends it.
  `static final class`
  `SessionCallbackBuilder.DefaultAllowedCommandProvider`
  Default implementation of `SessionCallbackBuilder.AllowedCommandProvider` that behaves as follows: Accepts connection requests from controller if any of the following conditions are met: Controller is in the same package as the session.
  `static interface`
  `SessionCallbackBuilder.DisconnectedCallback`
  Callback for handling controller disconnection.
  `static final class`
  `SessionCallbackBuilder.MediaIdMediaItemProvider`
  A `SessionCallbackBuilder.MediaItemProvider` that creates media items containing only a media ID.
  `static interface`
  `SessionCallbackBuilder.MediaItemProvider`
  Provides the `MediaItem`.
  `static interface`
  `SessionCallbackBuilder.PostConnectCallback`
  Callback for handling extra initialization after the connection.
  `static interface`
  `SessionCallbackBuilder.RatingCallback`
  Callback receiving a user rating for a specified media id.
  `static interface`
  `SessionCallbackBuilder.SkipCallback`
  Callback receiving skip backward and skip forward.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_SEEK_TIMEOUT_MS`
  Default timeout value for `setSeekTimeoutMs(int)`.

- ## Method Summary

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

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

- ## Field Details

  - ### DEFAULT_SEEK_TIMEOUT_MS

    public static final int DEFAULT_SEEK_TIMEOUT_MS
    Default timeout value for `setSeekTimeoutMs(int)`.
    See Also:
      - Constant Field Values