getAudioTrackInfo method
This interface is only supported by the premium version of the player (Player_Premium), and you need to purchase the premium version of the player mobile license. Returns the audio track information list.
Implementation
Future<List<TXTrackInfo>> getAudioTrackInfo() async {
if (_isNeedDisposed) return [];
await _initPlayer.future;
final transInfoData = await _mc!.invokeList('getAudioTrackInfo');
if (null != transInfoData) {
List<TXTrackInfo> trackInfoList = [];
for (Map<dynamic, dynamic> map in transInfoData) {
TXTrackInfo trackInfo = TXTrackInfo(map["name"], map["trackIndex"], map["trackType"]);
trackInfo.isSelected = map["isSelected"] ?? false;
trackInfo.isExclusive = map["isExclusive"] ?? true;
trackInfo.isInternal = map["isInternal"] ?? true;
trackInfoList.add(trackInfo);
}
return trackInfoList;
}
return [];
}