Esempio n. 1
0
 private void StopPodcast(Podcast obj)
 {
     MediaPlayer.Pause();
     _currentPodcast.IsBeingPlayed = false;
 }
Esempio n. 2
0
 private void PlayPodcast(Podcast podcast)
 {
     if (_currentPodcast == podcast)
     {
         MediaPlayer.Play();
         _currentPodcast.IsBeingPlayed = true;
     }
     else
     {
         MediaPlayer.Stop();
         _currentPodcast = podcast;
         foreach (var pod in Podcasts)
         {
             pod.IsBeingPlayed = false;
         }
         _currentPodcast.IsBeingPlayed = true;
         _currentPodcast.PropertyChanged += CurrentPodcastOnPropertyChanged;
         MediaPlayer.Open(new Uri(podcast.Href));
         MediaPlayer.Play();
     }
 }