Wednesday, 7 August 2013

Get videoId after successful upload with google-client-api

Get videoId after successful upload with google-client-api

I am implementing a video upload process using google-api-php-client. The
video is uploaded successfully, but I can not get the id of the uploaded
video. There is some method to get this id?
This is de code:
$created_file = $youtube->videos->insert('snippet', $video, array(
'data' => file_get_contents($form["video"]->getData()),
'mimeType' => 'video/avi',
));
And this the response:
Array ( [kind] => youtube#video [etag] =>
"TZl4Tt18r6WkVp7PTI77HitSjCQ/RXLbtMh-7z18Ult0b5lwdYrRTS0" [id] =>
2QCuQgaqu3s [snippet] => Array ( [publishedAt] => 2013-08-06T18:04:19.000Z
[channelId] => UC7Geu_Sv4ssBTHIMN3wiaKQ [title] => 3434 [description] =>
423423 [thumbnails] => Array ( [default] => Array ( [url] =>
https://i1.ytimg.com/vi/2QCuQgaqu3s/default.jpg ) [medium] => Array (
[url] => https://i1.ytimg.com/vi/2QCuQgaqu3s/mqdefault.jpg ) [high] =>
Array ( [url] => https://i1.ytimg.com/vi/2QCuQgaqu3s/hqdefault.jpg ) )
[channelTitle] => NetthinkIsobarTest [tags] => Array ( [0] => 4324 )
[categoryId] => 24 ) )
Thank you all

No comments:

Post a Comment