Class ExoVideoProgressTracker
-
- All Implemented Interfaces:
public final class ExoVideoProgressTrackerTracks video progress and emits video events such as start, quartiles, and completion.
-
-
Field Summary
Fields Modifier and Type Field Description private final IntArraythresholdsprivate final Array<VideoEvent>events
-
Constructor Summary
Constructors Constructor Description ExoVideoProgressTracker(Player player, AdConfig.HybridNativeConfig hybridNativeConfig, CoroutineScope coroutineScope, Long progressPollingInterval, MutableSharedFlow<VideoEvent> progressEvents, TrackPercentage trackPercentage)
-
Method Summary
Modifier and Type Method Description final IntArraygetThresholds()final Array<VideoEvent>getEvents()final UnitstartTracking()final UnitonCompleted()final UnitresetTracking()final UnitstopTracking()-
-
Constructor Detail
-
ExoVideoProgressTracker
ExoVideoProgressTracker(Player player, AdConfig.HybridNativeConfig hybridNativeConfig, CoroutineScope coroutineScope, Long progressPollingInterval, MutableSharedFlow<VideoEvent> progressEvents, TrackPercentage trackPercentage)
- Parameters:
player- The ExoPlayer instance to track.coroutineScope- The CoroutineScope for launching tracking coroutines.progressPollingInterval- The interval in milliseconds for polling progress events.progressEvents- A MutableSharedFlow to emit VideoEvent instances.trackPercentage- The configured track percentages for quartile tracking.
-
-
Method Detail
-
getThresholds
final IntArray getThresholds()
-
getEvents
final Array<VideoEvent> getEvents()
-
startTracking
final Unit startTracking()
-
onCompleted
final Unit onCompleted()
-
resetTracking
final Unit resetTracking()
-
stopTracking
final Unit stopTracking()
-
-
-
-