duration property

num get duration

Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.

MDN Reference

Implementation

_i2.num get duration => _i4.getProperty(
      this,
      'duration',
    );