Since: 0.9.4

playerStateChanged

Description

This event is fired when the playback state changed.

playerStateChanged.net

Types

function(e)JavaScript
Action<PlayerStateChangedEventArgs>.net

Parameters

ParametersTypeSummary
argsJavaScriptalphaTab.synth.PlayerStateChangedEventArgsThe information about the player state change event.
args.netAlphaTab.Synth.PlayerStateChangedEventArgsThe 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.PlayerStateThe new state of the player.
stoppedAllboolWhether 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);
});