void stream_GetLiveStreamUrlCompleted(LiveStreamEventArgs e) { try { (Application.Current as App).SmoothStreamURL = e.Result; Debug.WriteLine(e.Result); this.NavigationService.Navigate(new Uri("/PlayerPage.xaml", UriKind.Relative)); } catch { throw new Exception("GetLiveStreamUrl error"); } }
void WebClient_GetRealLiveStreamURL_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { try { if (e.Error != null) { throw new Exception(e.Error.Message); } //---------- string url = e.Result; LiveStreamEventArgs event_arg = new LiveStreamEventArgs(); event_arg.Result = url; GetLiveStreamUrlCompleted(event_arg); } catch (Exception ex) { Debug.WriteLine("LiveStream : WebClient_GetRealLiveStreamURL_DownloadStringCompleted ; " + ex.Message); } }
void stream_GetLiveStreamUrlCompleted(LiveStreamEventArgs e) { try { (Application.Current as App).SmoothStreamURL = e.Result; Debug.WriteLine(e.Result); player.Source = new Uri((Application.Current as App).SmoothStreamURL, UriKind.Absolute); } catch { throw new Exception("GetLiveStreamUrl error"); } }