Package com.castlabs.sdk.youbora
Class YouboraAnalyticsSession
- java.lang.Object
-
- com.castlabs.sdk.youbora.YouboraAnalyticsSession
-
- All Implemented Interfaces:
AnalyticsSession
,PlayerControllerPlugin.Component
public class YouboraAnalyticsSession extends Object implements AnalyticsSession
- Since:
- 3.1.0
-
-
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()
com.npaw.youbora.lib6.plugin.Plugin
getYouboraPlugin()
Return the underlying instance of the YouboraPlugin
API.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
setPlugin(com.npaw.youbora.lib6.plugin.Plugin youboraPlugin)
Sets the YouboraPlugin
instance to use.void
start(PlayerController playerController, AnalyticsMetaData analyticsMetaData)
void
stop()
-
-
-
Method Detail
-
start
public void start(@NonNull PlayerController playerController, @NonNull AnalyticsMetaData analyticsMetaData)
- Specified by:
start
in interfaceAnalyticsSession
-
detachFromController
public void detachFromController()
- Specified by:
detachFromController
in interfaceAnalyticsSession
-
onExoPlayerStateChanged
public void onExoPlayerStateChanged(boolean playWhenReady, int playbackState)
- Specified by:
onExoPlayerStateChanged
in interfaceAnalyticsSession
-
stop
public void stop()
- Specified by:
stop
in interfaceAnalyticsSession
-
release
public void release()
- Specified by:
release
in interfaceAnalyticsSession
-
adStart
public void adStart(Ad ad)
- Specified by:
adStart
in interfaceAnalyticsSession
-
adStop
public void adStop()
- Specified by:
adStop
in interfaceAnalyticsSession
-
adError
public void adError(CastlabsPlayerException exception)
- Specified by:
adError
in interfaceAnalyticsSession
-
adSkipped
public void adSkipped()
- Specified by:
adSkipped
in interfaceAnalyticsSession
-
sendError
public void sendError(String code, String message, int severity)
- Specified by:
sendError
in interfaceAnalyticsSession
-
seekStart
public void seekStart(long newPosition)
- Specified by:
seekStart
in interfaceAnalyticsSession
-
seekEnd
public void seekEnd()
- Specified by:
seekEnd
in interfaceAnalyticsSession
-
seekProcessed
public void seekProcessed()
- Specified by:
seekProcessed
in interfaceAnalyticsSession
-
getYouboraPlugin
@Nullable public com.npaw.youbora.lib6.plugin.Plugin getYouboraPlugin()
Return the underlying instance of the YouboraPlugin
API. May benull
if the session is not yet started.- Returns:
- the underlying instance of the Youbora Plugin API.
-
id
@NonNull public Class id()
- Specified by:
id
in interfacePlayerControllerPlugin.Component
-
onDestroy
public void onDestroy(@NonNull PlayerController playerController)
- Specified by:
onDestroy
in interfacePlayerControllerPlugin.Component
-
onOpenBundle
public void onOpenBundle(@NonNull PlayerController playerController, @NonNull Bundle bundle)
- Specified by:
onOpenBundle
in interfacePlayerControllerPlugin.Component
-
onOpenState
public void onOpenState(PlayerController playerController, PlayerConfig playerConfig)
- Specified by:
onOpenState
in interfacePlayerControllerPlugin.Component
-
setPlugin
public void setPlugin(@Nullable com.npaw.youbora.lib6.plugin.Plugin youboraPlugin)
Sets the YouboraPlugin
instance to use. Note that calling this method is not needed in case theYouboraPlugin
was alreadycreated
with a Plugin instance. Should be called beforeopening
the player.- Parameters:
youboraPlugin
- YouboraPlugin
instance to use.
-
-