Esempio n. 1
0
        /// <inheritdoc />
        public void Unload()
        {
            Manager.ManifestReady     -= Manager_ManifestReady;
            Manager.StateChanged      -= Manager_StateChanged;
            Manager.EndOfLive         -= Manager_EndOfLive;
            Manager.OutsideWindowEdge -= Manager_OutsideWindowEdge;
            MediaPlayer.SelectedAudioStreamChanged -= MediaPlayer_SelectedAudioStreamChanged;
            MediaPlayer.UpdateCompleted            -= MediaPlayer_UpdateCompleted;
#if WINDOWS_PHONE
            MediaPlayer.MediaLoading -= MediaPlayer_MediaLoading;
            MediaPlayer.MediaClosed  -= MediaPlayer_MediaClosed;
#endif
            Manager.Uninitialize();

            if (mediaElement is IDisposable)
            {
                ((IDisposable)mediaElement).Dispose();
            }
            mediaElement = null;
        }
        /// <inheritdoc />
        public void Unload()
        {
            Manager.ManifestReady -= Manager_ManifestReady;
            Manager.StateChanged -= Manager_StateChanged;
            Manager.EndOfLive -= Manager_EndOfLive;
            Manager.OutsideWindowEdge -= Manager_OutsideWindowEdge;
            MediaPlayer.SelectedAudioStreamChanged -= MediaPlayer_SelectedAudioStreamChanged;
            MediaPlayer.UpdateCompleted -= MediaPlayer_UpdateCompleted;
#if WINDOWS_PHONE
            MediaPlayer.MediaLoading -= MediaPlayer_MediaLoading;
            MediaPlayer.MediaClosed -= MediaPlayer_MediaClosed;
#endif
            Manager.Uninitialize();

            if (mediaElement is IDisposable) ((IDisposable)mediaElement).Dispose();
            mediaElement = null;
        }