MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / load

Method load

packages/alphatab/src/AlphaTabApiBase.ts:622–637  ·  view source on GitHub ↗

* Initiates a load of the score using the given data. * @returns true if the data object is supported and a load was initiated, otherwise false * @param scoreData The data container supported by IUiFacade. The supported types is depending on the platform: * * * A `alphaT

(scoreData: unknown, trackIndexes?: number[])

Source from the content-addressed store, hash-verified

620 * ```
621 */
622 public load(scoreData: unknown, trackIndexes?: number[]): boolean {
623 try {
624 return this.uiFacade.load(
625 scoreData,
626 score => {
627 this.renderScore(score, trackIndexes);
628 },
629 error => {
630 this.onError(error);
631 }
632 );
633 } catch (e) {
634 this.onError(e as Error);
635 return false;
636 }
637 }
638
639 /**
640 * Initiates a rendering of the given score.

Callers

nothing calls this directly

Calls 3

renderScoreMethod · 0.95
onErrorMethod · 0.95
loadMethod · 0.65

Tested by

no test coverage detected