protected override void OnPause() { base.OnPause(); _videoView.MediaPlayer.Stop(); _videoView.Dispose(); }
private void Button_Click(object sender, System.EventArgs e) { //_mediaPlayer.Stop(); _videoView.MediaPlayer = null; mainLayout.RemoveView(_videoView); _videoView.Dispose(); _videoView = new VideoView(this) { MediaPlayer = _mediaPlayer }; mainLayout.AddView(_videoView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent)); //_videoView.MediaPlayer.Play(); }
private void StopStream() { if (_mVideoView != null) { if (_mVideoView.MediaPlayer != null) { if (_mVideoView.MediaPlayer.IsPlaying) { Log.Debug("StreamingActivity", "MediaPlayer.Stop "); _mVideoView.MediaPlayer.Stop(); } } _mVideoWrapper.RemoveView(_mVideoView); _mVideoView.Dispose(); } }