isPlaying method

bool isPlaying()

Implementation

bool isPlaying() {
  bool playing = false;
  if (_videoPlayerController != null &&
      _current != null &&
      _current!.type == MediaType.video) {
    playing = _videoPlayerController?.value.isPlaying ?? false;
  } else if (_audioPlayer != null &&
      _current != null &&
      _current!.type == MediaType.audio) {
    playing = _audioPlayer?.state == audio_player.PlayerState.playing;
  }
  return playing;
}