Пример #1
0
        void ReleaseControl()
        {
            if (_view != null)
            {
                _view.MetadataRetrieved -= MetadataRetrieved;
                RemoveView(_view);
                _view.SetOnPreparedListener(null);
                _view.SetOnCompletionListener(null);
                _view.Dispose();
                _view = null;
            }

            if (_controller != null)
            {
                _controller.Dispose();
                _controller = null;
            }

            if (_mediaPlayer != null)
            {
                _mediaPlayer.Dispose();
                _mediaPlayer = null;
            }
        }