getDuration method

Future<double> getDuration()

Get the total duration.

Implementation

Future<double> getDuration() async {
  if (_isNeedDisposed) return 0;
  await _initPlayer.future;
  final result = await _mc!.invoke<double>('getDuration');
  return result ?? 0;
}