Exemplo n.º 1
0
        private void TryToLoadAndPlay(string uri)
        {
            inputURI = uri;

            VideoBox.SetPlaybackSource(MediaSource.CreateFromUri(new Uri(inputURI)));
            VideoBox.Play();

            //VideoBox.MediaPlayer.MediaFailed += URIMediaFailed;
        }
Exemplo n.º 2
0
        private async void picker_Click(object sender, RoutedEventArgs e)
        {
            inputFile = await OpenFile.LoadFileAsync();

            if (inputFile != null)
            {
                VideoBox.SetPlaybackSource(MediaSource.CreateFromStorageFile(inputFile));
                //VideoBox.MediaPlayer.RealTimePlayback = true;
                VideoBox.Play();

                //VideoBox.MediaPlayer.MediaFailed += LocalMediaFailed;
            }
        }
Exemplo n.º 3
0
        private async void TryToLoadAndPlay(StorageFile file)
        {
            inputFile = file;
            var stream = await inputFile.OpenAsync(FileAccessMode.Read);

            VideoBox.SetPlaybackSource(MediaSource.CreateFromStorageFile(inputFile));

            VideoBox.Play();
            //VideoBox.MediaPlayer.RealTimePlayback = true;
            //VideoBox.MediaPlayer.Play();
            MediaTitleBlock.Text = inputFile.DisplayName;

            //VideoBox.MediaPlayer.MediaFailed += LocalMediaFailed;
        }