Interface Ticker
public interface Ticker
The timeline ticker is responsible to update the last and the current playhead position of the
underlying video player, to its
TickerObserver
observers.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Describes the positions where the Ticker can start. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if the ticker has started and is currently activevoid
registerObserver
(TickerObserver tickerObserver) Registers an observer.void
reset()
Resets the ticker.default void
start
(long position) Starts the ticker with the specified position value.void
start
(Ticker.Position position) Starts the ticker with the specifiedTicker.Position
type.void
stop()
Stops the ticker.void
tick()
Updates the observers with the playhead position.void
unregisterObserver
(TickerObserver tickerObserver) Unregisters an observer.
-
Method Details
-
start
Starts the ticker with the specifiedTicker.Position
type. -
start
default void start(long position) Starts the ticker with the specified position value.- Parameters:
position
- the absolute position to start the ticker.
-
isRunning
boolean isRunning()Check if the ticker has started and is currently active- Returns:
- True if the ticker is running
-
stop
void stop()Stops the ticker. -
reset
void reset()Resets the ticker. -
tick
void tick()Updates the observers with the playhead position. -
registerObserver
Registers an observer.- Parameters:
tickerObserver
- the ticker observer
-
unregisterObserver
Unregisters an observer.- Parameters:
tickerObserver
- the ticker observer
-