Skip to main content

playerState

since 0.9.4

Description​

Gets the current player state, meaning whether it is paused or playing.

playerStateJavaScript
alphaTab('playerState')jQuery
PlayerState.net
playerStateAndroid

Types​

TypeValues
alphaTab.synth.PlayerStateJavaScript

0 for paused
1 for playing

AlphaTab.Synth.PlayerState.net
alphaTab.synth.PlayerStateAndroid

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
if(api.playerState != alphaTab.synth.PlayerState.Playing) api.play();