Class TimedTracker
java.lang.Object
com.brightcove.ssai.tracking.timed.TimedTracker
- All Implemented Interfaces:
TickerObserver
,Tracker
,TrackingConfigListener
Class in charge of handling the timed tracking events.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimedTracker
create
(Timeline timeline, TrackerDatasource trackerDatasource, List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> timedTrackingTriggers) Instantiates a TimedTracker.Returns theTimeline
.void
onTick
(long previous, long current) A tick represent an poll from the underlying video player.void
onTrackingConfigChanged
(TrackingConfig trackingConfig) Triggered when there is aTrackingConfig
change.void
track
(List<TrackingEvent> trackingEvents) Tracks the givenTrackingEvent
.
-
Method Details
-
create
public static TimedTracker create(@NonNull Timeline timeline, @NonNull TrackerDatasource trackerDatasource, @NonNull List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> timedTrackingTriggers) Instantiates a TimedTracker.- Parameters:
timeline
- an instance of theTimeline
to track.trackerDatasource
- an instance ofTrackerDatasource
timedTrackingTriggers
- the List of theTimedTrackingTrigger
to track.- Returns:
- new instance of a TimedTracker.
-
onTick
public void onTick(long previous, long current) Description copied from interface:TickerObserver
A tick represent an poll from the underlying video player.- Specified by:
onTick
in interfaceTickerObserver
- Parameters:
previous
- the last playhead position in millisecondscurrent
- the current playhead position in milliseconds
-
getTimeline
Description copied from interface:Tracker
Returns theTimeline
.- Specified by:
getTimeline
in interfaceTracker
-
track
Description copied from interface:Tracker
Tracks the givenTrackingEvent
. -
onTrackingConfigChanged
Description copied from interface:TrackingConfigListener
Triggered when there is aTrackingConfig
change.- Specified by:
onTrackingConfigChanged
in interfaceTrackingConfigListener
- Parameters:
trackingConfig
- the tracking config
-