load
Description​
Initiates a load of the score using the given data.
- JavaScript
- C#
- Kotlin
load(scoreData: unknown, trackIndexes?: number[]): boolean
bool Load(object scoreData, IList<double>? trackIndexes)
fun load(scoreData: Any, trackIndexes: alphaTab.collections.DoubleList?): Boolean
Parameter | Summary |
---|---|
scoreDataAll | The data container supported by
|
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​
- JavaScript
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.load('/assets/MyFile.gp');
var api = new AlphaTabApi<MyControl>(...);
api.Load(System.IO.File.OpenRead("MyFile.gp"));
val api = AlphaTabApi<MyControl>(...)
contentResolver.openInputStream(uri).use {
api.load(it)
}