playerFinished
Description​
This event is fired when the playback of the whole song finished. This event is finished regardless on whether looping is enabled or not.
playerFinishedJavaScript |
alphaTab.playerFinishedjQuery |
alphaTab.playerFinishedHTML |
PlayerFinished.net |
playerFinishedAndroid |
Types​
function()JavaScript |
Action.net |
() -> UnitAndroid |
Parameters​
None
Examples​
- JavaScript
- HTML
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playerFinished.on((args) => {
// speed trainer
api.playbackSpeed = Math.min(1.0, api.playbackSpeed + 0.1);
});
api.isLooping = true;
api.playbackSpeed = 0.5;
api.play()
const at = $('#alphaTab');
at.on('alphaTab.finished', (e, args) => {
at.alphaTab('playbackSpeed', Math.min(1.0, at.alphaTab('playbackSpeed') + 0.1)
});
at.alphaTab('loop', true);
at.alphaTab('playbackSpeed', 0.5);
at.alphaTab('play');
const at = document.querySelector('#alphaTab');
let api = null;
at.addEventListener('alphaTab.finished', (e) => {
api.playbackSpeed = Math.min(1.0, api.playbackSpeed + 0.1);
}, false);
api = new alphaTab.AlphaTabApi(at);
api.isLooping = true;
api.playbackSpeed = 0.5;
api.play()
var api = new AlphaTabApi<MyControl>(...);
api.PlayerFinished.On(() =>
{
// speed trainer
api.PlaybackSpeed = Math.Min(1.0, api.PlaybackSpeed + 0.1);
});
api.IsLooping = true;
api.PlaybackSpeed = 0.5;
api.Play();
val api = AlphaTabApi<MyControl>(...)
api.playerFinished.on {
// speed trainer
api.playbackSpeed = min(1.0, api.playbackSpeed + 0.1);
}
api.isLooping = true
api.playbackSpeed = 0.5
api.play()