Home > @magiclane/maps-sdk > Playback

Playback class

Represents the operations that can be performed on a DataSource which has playback capabilities

Signature:

export declare class Playback extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Properties

Property

Modifiers

Type

Description

currentPosition

readonly

number

Return the current position (milliseconds from begin/departure/starting point).

duration

readonly

number

The duration of the playback in milliseconds.

logPath

readonly

string

Get the log path.

maxSpeedMultiplier

readonly

number

Gets the maximum speed multiplier. Relevant for route based data source

minSpeedMultiplier

readonly

number

Gets the minimum speed multiplier. Relevant for route based data source

route

readonly

Route | null

Get the route if it is a simulation data source.

speedMultiplier

readonly

number

Get the speed multiplier. Relevant for route based data source

state

readonly

PlayingStatus

Return the playback state of this data source.

Methods

Method

Modifiers

Description

getLatestData(type)

The latest data from the DataSource.

init(id)

static

pause()

Pause the playback.

resume()

Resume the playback.

setCurrentPosition(newPosition)

Sets the current position (milliseconds from begin/departure/starting point).

setLoopMode(loopMode)

Sets play log continuously.

setSpeedMultiplier(speedMultiplier)

Sets the speed multiplier. Relevant for route based data source

step()

Step to the next frame. Only available for data sources that contain video.