예제 #1
0
 /// <summary>
 /// Plays the media
 /// </summary>
 public virtual void Play()
 {
     MediaPlayerBase.EnsureThread(DefaultApartmentState);
     MediaPlayerBase.Dispatcher.BeginInvoke((Action)(delegate
     {
         MediaPlayerBase.Play();
         Dispatcher.BeginInvoke(((Action)(() => SetIsPlaying(true))));
     }));
 }
예제 #2
0
 /// <summary>
 /// Pauses the media
 /// </summary>
 public virtual void Pause()
 {
     MediaPlayerBase.EnsureThread(DefaultApartmentState);
     MediaPlayerBase.Dispatcher.BeginInvoke((Action)(() => MediaPlayerBase.Pause()));
     SetIsPlaying(false);
 }
예제 #3
0
 protected void EnsurePlayerThread()
 {
     MediaPlayerBase.EnsureThread(DefaultApartmentState);
 }