forwardOrRewind method
If positive, forward (progressively) If Negative rewind (progressively) If 0 or null, restore the playing state
Implementation
Future<void> forwardOrRewind(double speed) async {
if (speed == 0) {
if (_wasPlayingBeforeForwardRewind == true) {
await play();
} else {
await pause();
}
_wasPlayingBeforeForwardRewind = null;
} else {
_wasPlayingBeforeForwardRewind ??= isPlaying.value;
await _sendChannel.invokeMethod('forwardRewind', {
'id': id,
'speed': speed,
});
}
}