/// <summary> /// Inicializar/Reproducir videos de youtube /// </summary> /// <param name="idVideo">ID del video a reproducir</param> public void ReproducirYoutube(string idVideo) { if (IsStream) { IsStream = false; GridVideo.Children.RemoveAt(1); mm.StateChanged -= Mm_StateChanged; mm.Stop(); mm.Dispose(); youtubePlayer = new YoutubePlayer { VideoSource = idVideo }; youtubePlayer.PropertyChanged += YoutubePlayer_PropertyChanged; GridVideo.Children.Insert(1, youtubePlayer); Controles.InputTransparent = true; Controles.Opacity = 0; Controles.IsEnabled = false; DeviceDisplay.KeepScreenOn = true; } else if (youtubePlayer != null) { youtubePlayer.SetSource(idVideo); } }