seekTo method

Future<void> seekTo(
  1. int position
)

Seeks to the specified position in milliseconds.

Implementation

Future<void> seekTo(int position) async {
  try {
    if (!_disposed) {
      _positionSubject.add(position);
    }
    await MymediaPlatform.instance.seekTo(position);
  } catch (e) {
    _handleError(
      PlayerException('seek_error', 'Error seeking to position', {
        'position': position,
        'error': e,
      }),
    );
  }
}