playerReady
Description
This event is fired when all required data for playback is loaded and ready. The player is ready for playback when all background workers are started, the audio output is initialized, a soundfont is loaded, and a song was loaded into the player as midi file.
playerReadyJavaScript |
alphaTab.playerReadyjQuery |
alphaTab.playerReadyHTML |
PlayerReady.net |
Types
function()JavaScript |
Action.net |
Parameters
none
Examples
- JavaScript
- HTML
- jQuery
- C#
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playerReady.on(() => {
enablePlayerControls();
});
$('#alphaTab').on('alphaTab.playerReady', (e) => {
enablePlayerControls();
});
document.querySelector('#alphaTab').addEventListener('alphaTab.playerReady', () => {
enablePlayerControls();
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.PlayerReady.On(() =>
{
EnablePlayerControls()
});