Exemplo n.º 1
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            if (lbSourceFiles.Items.Count < 2)
            {
                MessageBox.Show("You must add 2 or more files to test seamless playback.");
                return;
            }

            InitPlayer(MediaPlayer1);
            InitPlayer(MediaPlayer2);

            foreach (var item in lbSourceFiles.Items)
            {
                sourceFiles.Add(item.ToString());
            }

            CurrentPlayer = MediaPlayer1;

            VideoView1.Show();
            VideoView2.Hide();

            await PlayFileAsync(sourceFiles[0], MediaPlayer1);

            sourceFiles.RemoveAt(0);

            await PlayFileAsync(sourceFiles[0], MediaPlayer2);

            sourceFiles.RemoveAt(0);

            await MediaPlayer2.PauseAsync();
        }
Exemplo n.º 2
0
        public Videos()
        {
            this.InitializeComponent();
            Uri u = new Uri("https://www.youtube.com/watch?v=PmqdA05OXuI");

            VideoView.Navigate(u);

            Uri a = new Uri("https://www.youtube.com/watch?v=ouQGGCIGBSQ");

            VideoView1.Navigate(u);

            Uri b = new Uri("https://www.youtube.com/watch?v=iIVJN0Yz1Y0");

            VideoView2.Navigate(b);

            Uri c = new Uri("https://www.youtube.com/watch?v=kKvMUNndimA");

            VideoView3.Navigate(c);
        }
Exemplo n.º 3
0
        private async void StopDelegateMethod2()
        {
            //timer1.Enabled = false;
            tbTimeline.Value = 0;

            VideoView1.Show();
            VideoView2.Hide();

            CurrentPlayer = MediaPlayer1;
            await MediaPlayer1.ResumeAsync();

            if (sourceFiles.Count > 0)
            {
                await this.PlayFileAsync(sourceFiles[0], MediaPlayer2);

                sourceFiles.RemoveAt(0);
                await MediaPlayer2.PauseAsync();
            }
        }