Esempio n. 1
0
        static async Task Main(string[] args)
        {
            if (args.Length == 0)
            {
                Console.WriteLine("Please enter file name as app parameter.");
                return;
            }

            string filename = args[0];

            if (!File.Exists(filename))
            {
                Console.WriteLine($"File {filename} don't exists!");
                return;
            }

            Core.Initialize();

            var mp = new MediaPlayerControl(null);
            await mp.PlayAsync(new Uri(filename));

            Console.WriteLine("Press any key to exit...");

            Console.ReadKey();
        }
Esempio n. 2
0
        static async Task Main(string[] args)
        {
            MediaPlayerControl mediaPlayer = new MediaPlayerControl(null);
            await mediaPlayer.PlayAsync(new Uri("http://help.visioforge.com/video.mp4"));

            Console.WriteLine("Please press any key to stop.");
            Console.ReadKey();
        }
Esempio n. 3
0
 private async void btPlay_Click(object sender, RoutedEventArgs e)
 {
     videoView.VerticalAlignment   = VerticalAlignment.Stretch;
     videoView.HorizontalAlignment = HorizontalAlignment.Stretch;
     videoView.Width  = gridVideoView.Width;
     videoView.Height = gridVideoView.Height;
     await _mediaPlayer.PlayAsync(new Uri(edFilenameOrURL.Text));
 }
Esempio n. 4
0
 private async void btPlay_OnClicked(object sender, EventArgs e)
 {
     if (IsVideoViewInitialized)
     {
         _mediaPlayer.UpdateView(videoView);
         await _mediaPlayer.PlayAsync(new Uri(_filename));
     }
 }
 private void btPlay_TouchUpInside(object sender, EventArgs e)
 {
     if (_isPaused)
     {
         _mediaPlayer.ResumeAsync();
     }
     else
     {
         _mediaPlayer.PlayAsync(new Uri(edURL.Text));
     }
 }
        private async void btStart_Click(object sender, RoutedEventArgs e)
        {
            ApplyCrop();

            if (cbAudioOutputDevice.SelectedIndex != -1)
            {
                player.Audio_OutputDevice = cbAudioOutputDevice.Text;
            }

            player.Mute = !cbPlayAudio.IsChecked == true;

            ApplyVideoAdjustments();
            ApplyVideoDeinterlace();

            await player.PlayAsync(new Uri(edFilenameOrURL.Text));
        }
Esempio n. 7
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            isSeeking = false;

            mediaPlayer = new MediaPlayerControl(videoView)
            {
                //EnableHardwareDecoding = true
            };

            mediaPlayer.OnPositionChange += MediaPlayer_OnPositionChange;
            mediaPlayer.OnMediaLoaded    += MediaPlayer_OnMediaLoaded;

            //var name = $"textlogo1";
            //var effect = new TextOverlay(name, "TEST", 20, 20);

            //mediaPlayer.Video_Overlays_Add(effect);

            await mediaPlayer.PlayAsync(new Uri(edURL.Text));
        }
 private async void btPlay_Click(object sender, RoutedEventArgs e)
 {
     await player.PlayAsync(new Uri(edFilenameOrURL.Text));
 }