Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3712

How to change the field "Video language" through youtube's api

$
0
0

I want to do the same thing, explained in this question, i.e change the language through the API

The goal is that the script edits the first field Video language

Youtube's UI for language edition

I tried with defaultLanguage, to change value from fr-FR instead of fr.The link is created, but I still do not get the expected result. It changes the field Title and description languageResult

With defaultAudioLanguage, nothing...

function createYouTubeLive(oauth2Service, title, description, scheduledStartTime) {  var url = 'https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet,status,contentDetails';  var options = {    method: 'post',    contentType: 'application/json',    headers: {      Authorization: 'Bearer '+ oauth2Service.getAccessToken()    },    payload: JSON.stringify({      snippet: {        title: title,        description: description,        scheduledStartTime: scheduledStartTime,         defaultLanguage: 'fr',        defaultAudioLanguage: 'fr'      },      status: {        privacyStatus: 'unlisted', // public, unlisted, private        selfDeclaredMadeForKids: false      },      contentDetails: {        enableAutoStart: true,        enableAutoStop: true      }    }),     muteHttpExceptions: true // Activer l'option pour capturer les erreurs HTTP  };  var response = UrlFetchApp.fetch(url, options);  return response;}

Viewing all articles
Browse latest Browse all 3712

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>