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

Types​

TypeValues
alphaTab.synth.PlayerStateJavaScript

0 for paused


1 for playing

AlphaTab.Synth.PlayerState.net

Examples​

var api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
if(api.playerState != alphaTab.synth.PlayerState.Playing) api.play();
var at = $('#alphaTab');
if(at.alphaTab('playerState') != alphaTab.synth.PlayerState.Playing) at.alphaTab('play');
var api = new AlphaTabApi<MyControl>(...);
if(api.PlayerState != PlayerState.Playing) api.Play();