Beispiel #1
0
 private void btnPlay_Clicked(object sender, EventArgs e)
 {
     if (Player.IsPlaying)
     {
         Player.Stop();
     }
     Player.Seek(this.Lesson.Sentences[i].VocSt);
     Player.Play();
 }
Beispiel #2
0
 public Task Play(bool loop = false)
 {
     try
     {
         _audioStreamPlayer.Loop = loop;
         _audioStreamPlayer.Play();
         _audioStreamPlayer.PlaybackEnded += (e, s) => Stop();
         return(Task.Delay(0));
     }
     catch (NotImplementedException e)
     {
         throw e;
     }
 }
        partial void PlayButton_PrimaryActionTriggered(UIButton sender)
        {
            player.Play();

            isPlaying.Text = "Playing";
        }