resume method

Future<void> resume({
  1. double? endpointSeconds,
})

Resumes audio playback from the current playback position.

Note that on a freshly-loaded Audio (at playback position zero), this is equivalent to calling play.

If endpointSeconds is specified, playback will resume until that point, then stop playback and trigger an onComplete callback. If not specified, audio will play to the end of the file.

Implementation

Future<void> resume({double? endpointSeconds}) async {
  if (!_undisposedAudios.containsKey(_audioId)) {
    _logger.severe('Called resume() on a disposed Audio');
    return;
  }
  await _playHelper(playFromStart: false, endpointSeconds: endpointSeconds);
}