playbackRangeChanged
Description​
This event is fired when the playback range changed.
playbackRangeChangedJavaScript |
alphaTab.playbackRangeChangedjQuery |
alphaTab.playbackRangeChangedHTML |
PlaybackRangeChanged.net |
playbackRangeChangedAndroid |
Types​
function(e)JavaScript |
Action<PlaybackRangeChangedEventArgs>.net |
(e: PlaybackRangeChangedEventArgs) : UnitAndroid |
Parameters​
Parameters | Type | Summary |
---|---|---|
argsJavaScript | alphaTab.synth.PlaybackRangeChangedEventArgs | The information about the changed playback range. |
args.net | AlphaTab.Synth.PlaybackRangeChangedEventArgs | The information about the changed playback range. |
argsAndroid | alphaTab.synth.PlaybackRangeChangedEventArgs | The information about the changed playback range. |
PlaybackRangeChangedEventArgs Properties​
Parameters | Type | Summary |
---|---|---|
playbackRangeJavaScript | alphaTab.synth.PlaybackRange | The new playback range or null if no range is selected. (see PlaybackRange) |
PlaybackRange.net | AlphaTab.Synth.PlaybackRange | The new playback range or null if no range is selected. (see PlaybackRange) |
playbackRangeAndroid | alphaTab.synth.PlaybackRange | The new playback range or null if no range is selected. (see PlaybackRange) |
Examples​
- JavaScript
- HTML
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playbackRangeChanged.on((args) => {
if (args.playbackRange) {
highlightRangeInProgressBar(args.playbackRange.startTick, args.playbackRange.endTick);
} else {
clearHighlightInProgressBar();
}
});
$('#alphaTab').on('alphaTab.playbackRangeChanged', (e, args) => {
if (args.playbackRange) {
highlightRangeInProgressBar(args.playbackRange.startTick, args.playbackRange.endTick);
} else {
clearHighlightInProgressBar();
}
});
document.querySelector('#alphaTab').addEventListener('alphaTab.playbackRangeChanged', (e) => {
const args = e.detail;
if (args.playbackRange) {
highlightRangeInProgressBar(args.playbackRange.startTick, args.playbackRange.endTick);
} else {
clearHighlightInProgressBar();
}
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.PlaybackRangeChanged.On(args =>
{
if (args.PlaybackRange != null)
{
HighlightRangeInProgressBar(args.PlaybackRange.StartTick, args.PlaybackRange.EndTick);
}
else
{
ClearHighlightInProgressBar();
}
});
val api = AlphaTabApi<MyControl>(...)
api.playbackRangeChanged.on { args ->
val playbackRange = args.playbackRange
if (playbackRange != null) {
highlightRangeInProgressBar(playbackRange.startTick, playbackRange.endTick)
} else {
clearHighlightInProgressBar()
}
}