seek method
Seek to position
in milliseconds
https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#bool-seekint64_t-pos-seekflag-flags-stdfunctionvoidint64_t-ret-cb--nullptr
Implementation
Future<int> seek(
{required int position,
SeekFlag flags = const SeekFlag(SeekFlag.defaultFlags)}) async {
if (!(_seeked?.isCompleted ?? true)) {
_seeked?.complete(-2);
}
_seeked = Completer<int>();
if (!Libfvp.seek(nativeHandle, position, flags.rawValue,
NativeApi.postCObject.cast(), _receivePort.sendPort.nativePort)) {
_seeked!.complete(-10);
}
return _seeked!.future;
}