Package com.castlabs.sdk.youbora

## Class YouboraAnalyticsSession

- java.lang.Object
- - com.castlabs.analytics.AnalyticsSession
  - - com.castlabs.sdk.youbora.YouboraAnalyticsSession

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

      public class YouboraAnalyticsSession
      extends AnalyticsSession

  Since:
    3.1.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `adErrorInternal​(CastlabsPlayerException exception)` |
    `void` | `adSkippedInternal()` |
    `void` | `adStartInternal​(Ad ad)` |
    `void` | `adStopInternal()` |
    `void` | `detachFromControllerInternal()` |
    `com.npaw.youbora.lib6.plugin.Plugin` | `getYouboraPlugin()` | Return the underlying instance of the Youbora `Plugin` API.
    `Class` | `id()` |
    `void` | `onDestroy​(PlayerController playerController)` |
    `void` | `onExoPlayerStateChangedInternal​(boolean playWhenReady, int playbackState)` |
    `void` | `onOpenBundle​(PlayerController playerController, Bundle bundle)` |
    `void` | `onOpenState​(PlayerController playerController, PlayerConfig playerConfig)` |
    `void` | `releaseInternal()` |
    `void` | `reportPlayerStateInternal​(PlayerController.State state)` |
    `void` | `seekEndInternal()` |
    `void` | `seekProcessedInternal()` |
    `void` | `seekStartInternal​(long newPosition)` |
    `void` | `sendErrorInternal​(String code, String message, int severity)` |
    `void` | `setPlugin​(com.npaw.youbora.lib6.plugin.Plugin youboraPlugin)` | Sets the Youbora `Plugin` instance to use.
    `void` | `startInternal​(PlayerController playerController, AnalyticsMetaData analyticsMetaData)` |
    `void` | `stopInternal()` |

    - ### Methods inherited from class com.castlabs.analytics.AnalyticsSession

      `adError, adSkipped, adStart, adStop, detachFromController, getEnabled, onExoPlayerStateChanged, release, reportPlayerState, seekEnd, seekProcessed, seekStart, sendError, setEnabled, start, stop`

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

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

- - ### Method Detail

    - #### startInternal

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

    - #### detachFromControllerInternal

          public void detachFromControllerInternal()

    - #### onExoPlayerStateChangedInternal

          public void onExoPlayerStateChangedInternal​(boolean playWhenReady,
                                                      int playbackState)

    - #### stopInternal

          public void stopInternal()

    - #### releaseInternal

          public void releaseInternal()

    - #### adStartInternal

          public void adStartInternal​(Ad ad)

    - #### adStopInternal

          public void adStopInternal()

    - #### adErrorInternal

          public void adErrorInternal​(CastlabsPlayerException exception)

    - #### adSkippedInternal

          public void adSkippedInternal()

    - #### reportPlayerStateInternal

          public void reportPlayerStateInternal​(PlayerController.State state)

    - #### sendErrorInternal

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

    - #### seekStartInternal

          public void seekStartInternal​(long newPosition)

    - #### seekEndInternal

          public void seekEndInternal()

    - #### seekProcessedInternal

          public void seekProcessedInternal()

    - #### getYouboraPlugin

          @Nullable
          public com.npaw.youbora.lib6.plugin.Plugin getYouboraPlugin()

      Return the underlying instance of the Youbora `Plugin` API. May be `null` if the session is not yet started.
      Returns:
        the underlying instance of the Youbora Plugin API.

    - #### id

          @NonNull
          public Class id()

    - #### onDestroy

          public void onDestroy​(@NonNull
                                PlayerController playerController)

    - #### onOpenBundle

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

    - #### onOpenState

          public void onOpenState​(PlayerController playerController,
                                  PlayerConfig playerConfig)

    - #### setPlugin

          public void setPlugin​(@Nullable
                                com.npaw.youbora.lib6.plugin.Plugin youboraPlugin)

      Sets the Youbora `Plugin` instance to use. Note that calling this method is not needed in case the `YouboraPlugin` was already `created` with a Plugin instance. Should be called before `opening` the player.
      Parameters:
        `youboraPlugin` - Youbora `Plugin` instance to use.