seek method

  1. @override
void seek({
  1. double? to,
})
override

Implementation

@override
void seek({double? to}) {
  print('Final Seeking To $to from ${_audioElement?.currentTime}');
  if (_audioElement != null && to != null) {
    /// Explainer on the `/1000`
    /// The value being sent down from the plugin
    /// is in `milliseconds` and `AudioElement` uses seconds.
    /// This is to convert it.
    final toInSeconds = to / 1000;
    _audioElement?.currentTime = toInSeconds;
  }
}