您是否可以在已上传到YouTube的视频中添加或更新recordingDetails
?
使用以下代码片段,我可以更改标题和说明。我希望能够添加locationDescription,纬度和经度。除非它们在传递时似乎被忽略而没有错误。
$youtube = new Google_Service_YouTube($client);
$listResponse = $youtube->videos->listVideos("snippet,recordingDetails", array('id' => $videoId));
$video = $listResponse[0];
$videoSnippet = $video['snippet'];
$recordingDetails = $video['recordingDetails'];
$videoSnippet['description'] = $videoDesc;
$recordingDetails['locationDescription'] = $address;
$recordingDetails['location']['latitude'] = $latitude;
$recordingDetails['location']['longitude'] = $longitude;
$updateResponse = $youtube->videos->update("snippet,recordingDetails", $video);
添加新视频时,我可以选择添加这些值,以后不再添加。