MapboxReplayer
This class is similar to a music player. It will include controls like play, pause, seek.
Constructors
Functions
Stops the player, seeks to the beginning, and clears all replay events. In order to start playing a new route, pushEvents and then play.
The duration of the replay. This value will be between 0.0 and the total duration.
Used when the replayer is actively playing and emitting replay events. Call this from your ReplayEventsObserver to offset the current time to accurately represent when the simulated or historical event occurred - needed for sub-millisecond accuracy or when simulating routes at high frequencies @see ReplayRouteOptions.frequency.
The time of an event, relative to the duration of the replay.
This will begin playing the ReplayEventBase and notifying observers registered via registerObserver
This determines the speed of event playback. Default is 1.0 for 1x playback speed.
When initializing or testing an app, it is needed and useful to decide a code location to play the first location from GPS. When it is early, you may crash. When it is late, you may start in null island - LatLng(0,0). Use this function to play the first location received from your LocationEngine.
Appends events to be replayed. Notice the basis of your ReplayEventBase.eventTimestamp. When they are drastically different, you may need to seekTo events.
When initializing or testing an app, it is needed and useful to push a device location. This helper function can be used to push the actual location into the replayer.
Register replay event observers.
Seek to the event you want to play from.
Seek to a time to play from.
Remove registered observers.
Remove all registered observers. If the player is still playing, none of the events will be observed.