Skip to main content

highlightPlaybackRange

since 1.8.0

Description​

Places the highlight markers at the specified start and end-beat range. Unlike actually setting playbackRange this method only places the selection markers without actually changing the playback range. This method can be used when building custom selection systems (e.g. having draggable handles).

highlightPlaybackRange(startBeat: Beat, endBeat: Beat): void
ParameterSummary
startBeatAll

The start beat where the selection should start

endBeatAll

The end beat where the selection should end.

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
const startBeat = api.score.tracks[0].staves[0].bars[0].voices[0].beats[0];
const endBeat = api.score.tracks[0].staves[0].bars[3].voices[0].beats[0];
api.highlightPlaybackRange(startBeat, endBeat);