Пример #1
0
        public void PauseVideoClip(VideoModel video)
        {
            if (ActivePlayer.IsPlaying)
            {
                ActivePlayer.Pause();
            }
            else
            {
                ActivePlayer.Play();
            }

            OnVideoPaused?.Invoke(video, !ActivePlayer.IsPlaying);
        }
Пример #2
0
 ///<summary>Play or Pause the active videoplayer.</summary>
 public void PlayPause()
 {
     if (youtubeUrlReady && videoPlayer.isPrepared)
     {
         if (!pauseCalled)
         {
             OnVideoPaused.Invoke();
             Pause();
         }
         else
         {
             OnVideoStarted.Invoke();
             Play();
         }
     }
 }