Skip to main content

playerStateChanged

since 0.9.4

Description​

This event is fired when the playback state changed.

playerStateChangedJavaScript
alphaTab.playerStateChangedjQuery
alphaTab.playerStateChangedHTML
PlayerStateChanged.net

Types​

function(e)JavaScript
Action<PlayerStateChangedEventArgs>.net

Parameters​

ParametersTypeSummary
argsJavaScriptalphaTab.synth.PlayerStateChangedEventArgs

The information about the player state change event.

args.netAlphaTab.Synth.PlayerStateChangedEventArgs

The information about the player state change event.

PlayerStateChangedEventArgs Properties​

ParametersTypeSummary
stateJavaScriptalphaTab.synth.PlayerState

The new state of the player.


0 - Paused 1 - Playing

State.netAlphaTab.Synth.PlayerState

The new state of the player.

stoppedAllbool

Whether the playback was fully stopped (including jump to start) or only paused.

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playerStateChanged.on((args) => {
updatePlayerControls(args.state, args.stopped);
});