コード例 #1
0
        private async void VlcLiveBroadcastViewLoaded(object sender, RoutedEventArgs e)
        {
            try
            {
                LiveVM.Reset();
                await Task.Delay(1500);

                if (Broadcast != null)
                {
                    ShowLoading();
                    await LiveVM.SetBroadcast(Broadcast);

                    HideLoading();
                    await Task.Delay(500);

                    LiveVM.Play();
                }
                else if (!string.IsNullOrEmpty(BroadcastId))
                {
                    ShowLoading();
                    await LiveVM.SetBroadcast(BroadcastId);

                    HideLoading();
                    await Task.Delay(500);

                    LiveVM.Play();
                }
            }
            catch { }
        }
コード例 #2
0
        private async void LiveBroadcastViewLoaded(object sender, RoutedEventArgs e)
        {
            try
            {
                mediaElement.ManipulationMode   = ManipulationModes.TranslateY;
                mediaElement.ManipulationDelta -= OnManipulationDelta;
                mediaElement.ManipulationDelta += OnManipulationDelta;
            }
            catch { }

            try
            {
                LiveVM.Reset();
                await Task.Delay(1500);

                if (Broadcast != null)
                {
                    ShowLoading();
                    await LiveVM.SetBroadcast(Broadcast);

                    HideLoading();
                    await Task.Delay(500);

                    LiveVM.Play(mediaElement);
                }
                else if (!string.IsNullOrEmpty(BroadcastId))
                {
                    ShowLoading();
                    await LiveVM.SetBroadcast(BroadcastId);

                    HideLoading();
                    await Task.Delay(500);

                    LiveVM.Play(mediaElement);
                }
            }
            catch { }
        }