public class TimedTracker extends java.lang.Object implements Tracker, TickerObserver, TrackingConfigListener
Modifier and Type | Method and Description |
---|---|
static TimedTracker |
create(Timeline timeline,
TrackerDatasource trackerDatasource,
java.util.List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> timedTrackingTriggers)
Instantiates a TimedTracker.
|
Timeline |
getTimeline()
Returns the
Timeline . |
void |
onTick(long previous,
long current)
A tick represent an poll from the underlying video player.
|
void |
onTrackingConfigChanged(TrackingConfig trackingConfig)
Triggered when there is a
TrackingConfig change. |
void |
track(java.util.List<TrackingEvent> trackingEvents)
Tracks the given
TrackingEvent . |
public static TimedTracker create(@NonNull Timeline timeline, @NonNull TrackerDatasource trackerDatasource, @NonNull java.util.List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> timedTrackingTriggers)
timeline
- an instance of the Timeline
to track.trackerDatasource
- an instance of TrackerDatasource
timedTrackingTriggers
- the List of the TimedTrackingTrigger
to track.public void onTick(long previous, long current)
TickerObserver
onTick
in interface TickerObserver
previous
- the last playhead position in millisecondscurrent
- the current playhead position in milliseconds@NonNull public Timeline getTimeline()
Tracker
Timeline
.getTimeline
in interface Tracker
public void track(@NonNull java.util.List<TrackingEvent> trackingEvents)
Tracker
TrackingEvent
.public void onTrackingConfigChanged(@NonNull TrackingConfig trackingConfig)
TrackingConfigListener
TrackingConfig
change.onTrackingConfigChanged
in interface TrackingConfigListener
trackingConfig
- the tracking config