getDuration method

  1. @override
Future<int> getDuration()
override

Returns the total duration of the current media in seconds, or 0 if unavailable.

Implementation

@override
Future<int> getDuration() => _withPlayerAsync<int>(
      'getDuration',
      (p) => _doubleToSafeInt(p.duration()),
      0,
    );