I am using YouTube Data API Reference to change Video.snippet.defaultLanguage ( Videos | YouTube Data API | Google for Developers ) using the following API call
var resource = { snippet: { title: video.snippet.title, description : video.snippet.description, defaultLanguage: 'en-IN', categoryId: video.snippet.categoryId }, id: video.id, localizations, }; YouTube.Videos.update(resource, 'id,snippet,localizations');
I got the above code from the Youtube API Samples example.
Form trial and error, I understood that title and categoryId is important even though it is irrelevant here.
I have also looked at similar code given by others in GitHub ( Code search results · GitHub ), but unable to get a correct API call.
From the documentation, snippet.defaultLanguage is “the language of the text in the video resource’s snippet.title and snippet.description properties.”. So, it can’t be set?
Please help.
Thanks & regards,