getCurrentTrack method

  1. @deprecated
Future<AVPTrackInfo?> getCurrentTrack(
  1. int trackIdx
)

获取当前播放track

please use currentTrack

Implementation

@deprecated
Future<AVPTrackInfo?> getCurrentTrack(int trackIdx) async {
  try {
    Map<dynamic, dynamic> result = await FlutterAliPlayerFactory.methodChannel
        .invokeMethod("getCurrentTrack", wrapWithPlayerId(arg: trackIdx));
    return AVPTrackInfo.fromJson(result);
  } on PlatformException catch (e) {
  // throw Exception("数据获取异常 ${e.message}");
    return null;
  }
}