togglePlayPause method

void togglePlayPause()

Implementation

void togglePlayPause() {
  if (player.isPlaying) {
    player.pause();
  } else {
    player.play();
  }
  startTimer();
}