togglePlayState method

void togglePlayState()

Toggles the play state of the video.

Implementation

void togglePlayState() {
  if (!isPlayingNotifier.value) {
    play();
  } else {
    pause();
  }
}