示例#1
0
 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");
     }
    
 }
示例#2
0
        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);
            }
        }
示例#3
0
        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");
            }

        }