Skip to main content

playerPositionChanged

since 0.9.4

Description

This event is fired when the current playback position of the song changed.

playerPositionChangedJavaScript
alphaTab.playerPositionChangedjQuery
alphaTab.playerPositionChangedHTML
PlayerPositionChanged.net

Types

function(args)JavaScript
Action<PositionChangedEventArgs>.net

Parameters

ParametersTypeSummary
argsJavaScriptalphaTab.synth.PositionChangedEventArgs

The information about the player position.

args.netAlphaTab.Synth.PositionChangedEventArgs

The information about the player position.

PositionChangedEventArgs Properties

ParametersTypeSummary
currentTimeJavaScriptnumber

The current time position within the song in milliseconds.

CurrentTime.netdouble

The current time position within the song in milliseconds.

endTimeJavaScriptnumber

The total length of the song in milliseconds.

EndTime.netdouble

The current time position within the song in milliseconds.

currentTickJavaScriptnumber

The current time position within the song in midi ticks.

CurrentTick.netdouble

The current time position within the song in midi ticks.

endTickJavaScriptnumber

The total length of the song in midi ticks.

EndTick.netdouble

The current time position within the song in midi ticks.

isSeekJavaScriptboolean

Whether the position changed because of time seeking and not due to playback.

since 1.2.0-alpha.97
IsSeek.netbool

Whether the position changed because of time seeking and not due to playback.

since 1.2.0-alpha.97

Examples

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playerPositionChanged.on((args) => {
updatePlayerPosition(args);
});