play method

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

play the current video

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

Implementation

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

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

  playerStatus.status.value = PlayerStatus.playing;
  screenManager.setOverlays(false);
  _hideTaskControls();
}