Exemple #1
0
        private void Spelling_Tapped(object sender, EventArgs e)
        {
            var converted = currentWord.Substring(LettersView.Position, 1).Convert();
            var letter    = Char.ToUpper(converted);

            _audioPlayerService.Play(letter + ".mp3");
        }
        protected override void OnAppearing()
        {
            base.OnAppearing();

            audServ = DependencyService.Get <IAudioPlayerService>();

            audServ.Play("1).3gpp");
        }
        protected override void OnAppearing()
        {
            base.OnAppearing();

            audServ = DependencyService.Get <IAudioPlayerService>();

            audServ.Play("6.3gpp");

            audServ.OnFinishedPlaying = () =>
            {
                if (!fin)
                {
                    fin = true;
                    audServ.Play("7.3gpp");
                }
            };
        }
Exemple #4
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            var product = (DetailPageViewModel)BindingContext;

            var productNarration = product.ProductDetail.Narration;

            audServ = DependencyService.Get <IAudioPlayerService>();

            audServ.Play($"{productNarration}");

            audServ.OnFinishedPlaying = () =>
            {
                if (!fin)
                {
                    fin = true;
                    audServ.Play("10).3gpp");
                }
            };
        }
Exemple #5
0
        protected override void OnAppearing()
        {
            base.OnAppearing();


            audServ = DependencyService.Get <IAudioPlayerService>();

            audServ.Play("a.3gpp");



            //audServ.OnFinishedPlaying = () => {
            //    if (!fin)
            //    {
            //        fin = true;
            //        audServ.Play("b.3gpp");
            //    }
            //};
        }
Exemple #6
0
 private void PlayPauseCommandAction()
 {
     if (CommandText.Equals(PLAY_COMMAND))
     {
         if (_stopped)
         {
             _stopped = false;
             _audioPlayerService.PlayFromFile("Galway.mp3");
         }
         else
         {
             _audioPlayerService.Play();
         }
         CommandText = PAUSE_COMMAND;
     }
     else
     {
         _audioPlayerService.Pause();
         CommandText = PLAY_COMMAND;
     }
 }
Exemple #7
0
        //private ICommand _playPauseCommand;

        //public ICommand PlayPauseCommand
        //{
        //    get
        //    {
        //        return _playPauseCommand ?? (_playPauseCommand = new Command(
        //          (obj) =>
        //          {
        //              if (CommandText == "Play")
        //              {
        //                  if (_isStopped)
        //                  {
        //                      _isStopped = false;
        //                      _audioPlayer.Play("1.3gpp");
        //                  }
        //                  else
        //                  {
        //                      _audioPlayer.Play();
        //                  }
        //                  CommandText = "Pause";
        //              }
        //              else
        //              {
        //                  _audioPlayer.Pause();
        //                  CommandText = "Play";
        //              }
        //          }));
        //    }
        //}

        public void play(string fileName)
        {
            _audioPlayer.Play(fileName);
        }