videoSeekToNextSeconds method

Future<void> videoSeekToNextSeconds(
  1. int seconds,
  2. bool playing
)

enter to picture in picture mode only Android

only available since Android 7

Implementation

/*Future<void> enterPip(BuildContext context) async {
  if (this.pipAvailable.value && this.pipEnabled) {
    controls = false; // hide the controls
    if (!fullscreen.value) {
      // if the player is not in the fullscreen mode
      _pipContextToFullscreen = context;
      goToFullscreen(context, appliyOverlaysAndOrientations: false);
    }
    await _pipManager.enterPip();
  }
}*/
Future<void> videoSeekToNextSeconds(int seconds, bool playing) async {
  if (seconds == 0) {
    return;
  }
  int position = 0;

  position = _videoPlayerController!.state.position.inSeconds;

  await seekTo(Duration(seconds: position + seconds));
  if (playing) {
    await play();
  }
  //
}