I need to know how can I change the privacy status of a youtube video. The video have \'unlisted\' privacy status and I want to change to \'public\'.
Here there is a
I have set the privacy status when uploading video to YouTube. I believe it similar for updating the video also.
I didn't test the following code. But I hope you can give a shot.
First you retrieve the video status property.
$listResponse = $youtube->videos->listVideos('status', array('id' => $videoId));
Then you get the video status property
$video = $listResponse[0];
$videoStatus = $video['status'];
Then you set the video status. Valid values are 'private', 'public', 'unlisted'.
$videoStatus->privacyStatus = 'public';
Finally you update the status & then video
$video->setStatus($videoStatus);
$updateResponse = $youtube->videos->update('status', $video);
Hope this will help you