/// <summary>
        /// Closes the media
        /// </summary>
        public virtual void Close()
        {
            SetBackBuffer(IntPtr.Zero);
            InvalidateVideoImage();

            if(!MediaPlayerBase.Dispatcher.ShuttingOrShutDown)
                MediaPlayerBase.Dispatcher.BeginInvoke((Action)(delegate
                {
                    MediaPlayerBase.Close();
                    MediaPlayerBase.Dispose();
                }));
            
            SetIsPlaying(false);
        }
Beispiel #2
0
 public static void Dispose()
 {
     _positionTimer.Stop();
     _mediaPlayer.Dispose();
 }