Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

upload unlisted video #414

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_release_notes.
html

Revision history dated on July 13, 2010:
new access control is added: <yt:accessControl>

it's not implemented yet on .NET library?

Original issue reported on code.google.com by 2008thew...@gmail.com on 2 Aug 2010 at 1:10

GoogleCodeExporter commented 9 years ago
i need to upload a video through Browser-based upload, and the privacy setting 
of the video will be "unlisted" and may be embedded. for now i can only set the 
video privacy to public/private (by setting the YouTubeEntry.Private Property 
to true/false).

is it already included on .NET library?

Original comment by 2008thew...@gmail.com on 2 Aug 2010 at 2:50

GoogleCodeExporter commented 9 years ago
This has been a regular comment on several forums. There are many .NET 
developers attempting to integrate YouTube. Finding outdated API and 
documentation makes us want to run the other way. I managed to implement by 
breaking into 2 steps. Firstly uploading the video and then updating it using 
extensions, but there is no reason to have to resort to this.

Original comment by mottypro...@gmail.com on 28 Oct 2010 at 8:05

GoogleCodeExporter commented 9 years ago
Kludgy workaround *might* work. I'm getting a 400 error but I suspect that's 
for an entirely different reason.

public static void SetVideoAsUnlisted(Video video)
{
    video.Private = false;
    var exts = video.YouTubeEntry.ExtensionElements
        .Where(x => x is XmlExtension)
        .Select(x => x as XmlExtension)
        .Where(x => x.Node.Name.ToLower().Contains("accesscontrol"));
    foreach (XmlNode x in exts)
    {
        if (x.Attributes["action"].InnerText.Equals("list"))
        {
            x.Attributes["permission"].InnerText = "denied";
        }
    }
}

Original comment by MrStimp...@gmail.com on 22 Jun 2011 at 5:58

GoogleCodeExporter commented 9 years ago
Support for yt:accessControl was added in rev. 1118:

http://code.google.com/p/google-gdata/source/detail?r=1118

Original comment by ccherub...@google.com on 3 Aug 2011 at 12:14