Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8476281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:08:11+00:00 2026-06-10T18:08:11+00:00

I am developing an application is uploading video to youtube with Youtube Api 2.0

  • 0

I am developing an application is uploading video to youtube with Youtube Api 2.0 on C#

Here is my code

    Video newVideo = new Video();

    newVideo.Title = "kankaaaa";
    newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema));
    newVideo.Keywords = "education, funny deneme";
    newVideo.Description = "bilgi mi istiyorsun";
    newVideo.YouTubeEntry.Private = false;
    newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag",
    YouTubeNameTable.DeveloperTagSchema));
    newVideo.YouTubeEntry.MediaSource = new MediaFileSource("c:\\cat.flv",
          "video/quicktime");      
   // newVideo.Private = true;

 Video createdVideo = Request.Upload(newVideo);

Video class is under Google.YouTube namespace.

I can upload video without any problem. When Requested completed it returns an object which type is Video.

But I want to see detail of processing. I mean percent of uploading. I searched and I found two functions are getUploadState() and getProgress(). But I cant find it on youtube api.

there is just Status class member of the Video Class. It shows result of video. But I want to learn uploading process detail. Such as 40% completed..

What should I use ? I thought that I could Backgroundworker but I am not sure if it works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:08:12+00:00Added an answer on June 10, 2026 at 6:08 pm

    I solved my own problem.. it was a bit difficult but I finally did 🙂

    public bool InsertVideo()
        {
            Trace.TraceInformation("Entering InsertVideo: starting a new upload");
            Video newVideo = new Video();
    
            newVideo.Title = "MY video";
            newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema));
            newVideo.Keywords = "education, funny deneme";
            newVideo.Description = "bilgi mi istiyorsun";
            newVideo.YouTubeEntry.Private = false;
            newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag",
              YouTubeNameTable.DeveloperTagSchema));
    
            newVideo.YouTubeEntry.MediaSource = new MediaFileSource("c:\\cat.flv",
              "video/quicktime");
            // newVideo.Private = true;
    
            GDataCredentials credentials = new GDataCredentials(UserName, PassWord);
    
            Authenticator youTubeAuthenticator =new ClientLoginAuthenticator("YoutubeUploader",
                        ServiceNames.YouTube, credentials);
            youTubeAuthenticator.DeveloperKey = DevKey;
    
    
            AtomLink link = new AtomLink("http://uploads.gdata.youtube.com/resumable/feeds/api/users/" + UserName + "/uploads");
            link.Rel = ResumableUploader.CreateMediaRelation;
            newVideo.YouTubeEntry.Links.Add(link);
    
            ResumableUploader ru = new ResumableUploader();
            ru.AsyncOperationCompleted += new AsyncOperationCompletedEventHandler(this.OnDone);
            ru.AsyncOperationProgress += new AsyncOperationProgressEventHandler(this.OnProgress);
            var tmpvalue = "bla bla bla";
            ru.InsertAsync(youTubeAuthenticator, newVideo.YouTubeEntry, tmpvalue);
    
    
    
            return true;
        }
    
        private void OnProgress(object sender, AsyncOperationProgressEventArgs e)
        {
           Debug.WriteLine("It has been completed : " + e.ProgressPercentage);
        }
    
        private void OnDone(object sender, AsyncOperationCompletedEventArgs e)
        {
    
            Debug.WriteLine("It has Done");
        }
    

    And you can access information of uploaded video in OnDone event with AsyncOperationCompletedEventArgs e parameter and property is ResponseStream

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a VB6 legacy application. I have started writing all new code
I am developing an application in java for processing data and uploading it to
I am developing a web application where users will be uploading a large number
I'm developing application with GWT 2 and would like to add float panel that
I'm developing application using backbone.js & jquery. I have following code in model: runReport:
Introduction to the situation For an application I'm currently developing, I need to code
I'm currently developing a web application whose primary user function is uploading and downloading
I have been developing a new JavaScript application which is rapidly growing in size.
When you are developing a new Rails application, is it preferable to build your
I'm developing my web application and testing it afterward uploading to Heroku. I don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.