/// <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); }
public static void Dispose() { _positionTimer.Stop(); _mediaPlayer.Dispose(); }