Package com.castlabs.sdk.mux

## Class MuxAnalyticsSession

- java.lang.Object
- - com.castlabs.sdk.mux.MuxAnalyticsSession

- All Implemented Interfaces:
    `AnalyticsSession`, `PlayerControllerPlugin.Component`

      public class MuxAnalyticsSession
      extends Object
      implements AnalyticsSession

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `adError​(CastlabsPlayerException exception)` |
    `void` | `adSkipped()` |
    `void` | `adStart​(Ad ad)` |
    `void` | `adStop()` |
    `void` | `detachFromController()` |
    `Class` | `id()` |
    `void` | `onDestroy​(PlayerController playerController)` |
    `void` | `onExoPlayerStateChanged​(boolean playWhenReady, int playbackState)` |
    `void` | `onOpenBundle​(PlayerController playerController, Bundle bundle)` |
    `void` | `onOpenState​(PlayerController playerController, PlayerConfig playerConfig)` |
    `void` | `release()` |
    `void` | `seekEnd()` |
    `void` | `seekProcessed()` |
    `void` | `seekStart​(long newPosition)` |
    `void` | `sendError​(String code, String message, int severity)`
    `void` | `start​(PlayerController playerController, AnalyticsMetaData analyticsMetaData)` |
    `void` | `stop()` |

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

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

- - ### Method Detail

    - #### start

          public void start​(@NonNull
                            PlayerController playerController,
                            @NonNull
                            AnalyticsMetaData analyticsMetaData)

      Specified by:
        `start` in interface `AnalyticsSession`

    - #### stop

          public void stop()

      Specified by:
        `stop` in interface `AnalyticsSession`

    - #### release

          public void release()

      Specified by:
        `release` in interface `AnalyticsSession`

    - #### detachFromController

          public void detachFromController()

      Specified by:
        `detachFromController` in interface `AnalyticsSession`

    - #### adStart

          public void adStart​(Ad ad)

      Specified by:
        `adStart` in interface `AnalyticsSession`

    - #### adStop

          public void adStop()

      Specified by:
        `adStop` in interface `AnalyticsSession`

    - #### adError

          public void adError​(CastlabsPlayerException exception)

      Specified by:
        `adError` in interface `AnalyticsSession`

    - #### adSkipped

          public void adSkipped()

      Specified by:
        `adSkipped` in interface `AnalyticsSession`

    - #### sendError

          public void sendError​(String code,
                                String message,
                                int severity)

      Forwards the error to MUX, regardless of the severity. For standard fatal errors there's no need to call this method, as they are sent automatically.

      Specified by:
        `sendError` in interface `AnalyticsSession`
      Parameters:
        `code` - The error code. Must be an integer, otherwise -1 will be sent to MUX
        `message` - The error message
        `severity` - Ignored

    - #### seekStart

          public void seekStart​(long newPosition)

      Specified by:
        `seekStart` in interface `AnalyticsSession`

    - #### seekEnd

          public void seekEnd()

      Specified by:
        `seekEnd` in interface `AnalyticsSession`

    - #### seekProcessed

          public void seekProcessed()

      Specified by:
        `seekProcessed` in interface `AnalyticsSession`

    - #### onExoPlayerStateChanged

          public void onExoPlayerStateChanged​(boolean playWhenReady,
                                              int playbackState)

      Specified by:
        `onExoPlayerStateChanged` in interface `AnalyticsSession`

    - #### id

          @NonNull
          public Class id()

      Specified by:
        `id` in interface `PlayerControllerPlugin.Component`

    - #### onDestroy

          public void onDestroy​(@NonNull
                                PlayerController playerController)

      Specified by:
        `onDestroy` in interface `PlayerControllerPlugin.Component`

    - #### onOpenBundle

          public void onOpenBundle​(@NonNull
                                   PlayerController playerController,
                                   @NonNull
                                   Bundle bundle)

      Specified by:
        `onOpenBundle` in interface `PlayerControllerPlugin.Component`

    - #### onOpenState

          public void onOpenState​(@NonNull
                                  PlayerController playerController,
                                  @NonNull
                                  PlayerConfig playerConfig)

      Specified by:
        `onOpenState` in interface `PlayerControllerPlugin.Component`