コード例 #1
0
        private async void playButton_Click(object sender, RoutedEventArgs e)
        {
            // Get URI
            if (player != null)
            {
                player.Close();
                player = null;
            }
            Uri uri;

            try
            {
                uri = new Uri(sourceUrl.Text);
            }
            catch
            {
                rootPage.NotifyUser("Invalid URL given", NotifyType.ErrorMessage);
                return;
            }

            haveSetSource = true;
            player        = new LiveDash.LiveDashPlayer();

            if (haveSetLiveOffset)
            {
                player.DesiredLiveOffset(liveOffset);
            }

            await player.Initialize(uri, mediaElement);

            // Clear the status block when you press play
            rootPage.NotifyUser(String.Empty, NotifyType.StatusMessage);
        }
コード例 #2
0
 protected override void OnNavigatedFrom(NavigationEventArgs e)
 {
     if (player != null)
     {
         player.Close();
         player = null;
     }
     haveSetSource = false;
 }
コード例 #3
0
 protected override void OnNavigatedFrom(NavigationEventArgs e)
 {
     if (player != null)
     {
         player.Close();
         player = null;
     }
     haveSetSource = false;
 }
コード例 #4
0
        private async void playButton_Click(object sender, RoutedEventArgs e)
        {
            // Get URI
            if (player != null)
            {
                player.Close();
                player = null;
            }
            Uri uri;
            try
            {
                uri = new Uri(sourceUrl.Text);
            }
            catch
            {
                rootPage.NotifyUser("Invalid URL given", NotifyType.ErrorMessage);
                return;
            }

            haveSetSource = true;
            player = new LiveDash.LiveDashPlayer();

            if (haveSetLiveOffset)
            {
                player.DesiredLiveOffset(liveOffset);
            }

            await player.Initialize(uri, mediaElement);

            // Clear the status block when you press play
            rootPage.NotifyUser(String.Empty, NotifyType.StatusMessage);

        }