getDuration method

Future<int> getDuration()

Gets the duration of the current audio in milliseconds.

Implementation

Future<int> getDuration() async {
  final duration = await MymediaPlatform.instance.getDuration();
  if (!_disposed) {
    _durationSubject.add(duration);
  }
  return duration;
}