play method

Future<void> play({
  1. bool repeat = false,
  2. bool hideControls = true,
})

play the current video

repeat if is true the player go to Duration.zero before play

Implementation

Future<void> play({bool repeat = false, bool hideControls = true}) async {
  if (repeat) {
    await seekTo(Duration.zero);
  }

  await _videoPlayerController?.play();
  await getCurrentVolume();
  await getCurrentBrightness();

  playerStatus.status.value = PlayerStatus.playing;
  // screenManager.setOverlays(false);
  if (hideControls && autoHideControls) {
    _hideTaskControls();
  }
  //
}