player.playerMode
player.playerModeJavaScript
player.playerModeJSON
Player.PlayerMode.net
player.playerModeAndroid
Description​
Whether the player should be enabled and which mode it should use. This setting configures whether the player feature is enabled or not. Depending on the platform enabling the player needs some additional actions of the developer.
Synthesizer
If the synthesizer is used (via EnabledAutomatic
or EnabledSynthesizer
) a sound font is needed so that the midi synthesizer can produce the audio samples.
For the JavaScript version the player.soundFont property must be set to the URL of the sound font that should be used or it must be loaded manually via API. For .net manually the soundfont must be loaded.
Backing Track
For a built-in backing track of the input file no additional data needs to be loaded (assuming everything is filled via the input file).
Otherwise the score.backingTrack
needs to be filled before loading and the related sync points need to be configured.
External Media
For synchronizing alphaTab with an external media no data needs to be loaded into alphaTab. The configured sync points on the MasterBars are used as reference to synchronize the external media with the internal time axis. Then the related APIs on the AlphaTabApi object need to be used to update the playback state and exterrnal audio position during playback.
User Interface
AlphaTab does not ship a default UI for the player. The API must be hooked up to some UI controls to allow the user to interact with the player.
- JavaScript
- C#
- Kotlin
playerMode: PlayerMode = PlayerMode.Disabled;
PlayerMode PlayerMode { get; set; } = PlayerMode.Disabled
var playerMode: PlayerMode = PlayerMode.Disabled