我对youtube javascript API有疑问。
我想得到指定视频的aspectRatio不是我的。
我在getting-started-guide(https://developers.google.com/youtube/v3/getting-started)中找到了有关contentDetails的aspectRatio属性的信息。
但是当我访问这个时,我找不到这个aspectRatio属性(https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&part=snippet,contentDetails,statistics,status&key=API_KEY)
只有视频所有者可以通过fileDetails选择视频的aspectRatio吗?
谢谢!
是。只有视频的所有者才能访问fileDetails
属性 - 包括aspectRatio
。如果您尝试发出videos.list请求fileDetails,您将收到此错误响应:
"message": "The request is not properly authorized to access video file or processing information. Note that the <code>fileDetails</code>, <code>processingDetails</code>, and <code>suggestions</code> parts are only available to that videos owner."