Skip to main content

load

since 0.9.4

Description​

Initiates a load of the score using the given data.

load(scoreData: unknown, trackIndexes?: number[]): boolean
ParameterSummary
scoreDataAll

The data container supported by IUiFacade. The supported types is depending on the platform:

  • A alphaTab.model.Score instance (all platforms)
  • A ArrayBuffer or Uint8Array containing one of the supported file formats (all platforms, native byte array or input streams on other platforms)
  • A url from where to download the binary data of one of the supported file formats (browser only)
trackIndexesAll

The indexes of the tracks from the song that should be rendered. If not provided, the first track of the song will be shown.

Returns​

true if the data object is supported and a load was initiated, otherwise false

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.load('/assets/MyFile.gp');