Esempio n. 1
0
        private async void GetVideoInfoAsync()
        {
            // Check params
            if (VideoId.IsBlank())
            {
                return;
            }

            IsBusy = true;
            IsProgressIndeterminate = true;

            // Reset data
            VideoInfo = null;

            // Parse URL if necessary
            string id;

            if (!YoutubeClient.TryParseVideoId(VideoId, out id))
            {
                id = VideoId;
            }

            // Perform the request
            VideoInfo = await _client.GetVideoInfoAsync(id);

            IsProgressIndeterminate = false;
            IsBusy = false;
        }