Пример #1
0
        private void ShowVideo(Uri uri)
        {
            _isShowingMedia      = true;
            VideoControl.Opacity = 1;
            if (VideoControl.MediaPlayer == null)
            {
                VideoControl.SetMediaPlayer(_mediaPlayer);
            }

            VideoControl.MediaPlayer.Source = null;
            VideoControl.UriSource          = uri;
            VideoControl.MediaPlayer.PlaybackSession.PositionChanged -= OnPlaybackPosChanged;
            VideoControl.MediaPlayer.PlaybackSession.PositionChanged += OnPlaybackPosChanged;
            VideoControl.Activate();
        }