duanduan8439 2015-03-22 06:47 采纳率: 100%
浏览 104

如何使用YouTube API上传录音资产?

We have a CMS on YouTube. I am trying to write a PHP script using Youtube API that uploads sound recordings and creates assets based on these recordings. I am reading the references on inserting assets in Google developers:

https://developers.google.com/youtube/partner/docs/v1/assets/insert

The example shown here is about uploading videos. The following snippet shows how to create a video insert request.

// Create a request for the API's videos.insert method to create and upload the video. $insertRequest = $youtube->videos->insert("status,snippet", $video, array('onBehalfOfContentOwner' => $contentOwnerId, 'onBehalfOfContentOwnerChannel' => $channelId));

But i am not finding anything regarding creating an audio or sound recording insert request to be able to upload the recordings. So how to create insert sound recording insert requests instead of video?

Appreciate any help regarding this issue. Thank you

  • 写回答

1条回答 默认 最新

  • douang4294 2015-03-31 19:15
    关注

    I think you are confused between assets and claims. In that example, you insert video for claim not for asset.

    What you are asking is uploading a reference audio. Here's the full guide: https://developers.google.com/youtube/partner/asset_reference_upload_example

    评论

报告相同问题?