【问题标题】:How to get AspectRatio(or orientation) of youtube video如何获取 youtube 视频的纵横比(或方向)
【发布时间】:2019-02-08 23:22:07
【问题描述】:

我有一个关于 youtube javscript API 的问题。

我想获取不是我的指定视频的宽高比。

我在getting-started-guide(https://developers.google.com/youtube/v3/getting-started)找到了关于contentDetails的aspectRatio属性的信息。

example ratio

但是当我访问它时我没有找到这个 aspectRatio 属性 (https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&part=snippet,contentDetails,statistics,status&key=API_KEY)

只有视频所有者可以通过fileDetails选择视频的aspectRatio吗?

谢谢!

【问题讨论】:

    标签: javascript youtube youtube-api youtube-data-api


    【解决方案1】:

    是的。只有视频的所有者才能访问 fileDetails 属性 - 其中包括 aspectRatio。如果您尝试发出videos.list 请求以获取文件详细信息,您将收到以下错误响应:

    "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."
    

    【讨论】:

      猜你喜欢
      • 2019-06-22
      • 2020-06-02
      • 1970-01-01
      • 2021-02-23
      • 1970-01-01
      • 2013-12-29
      • 1970-01-01
      • 2018-01-26
      • 1970-01-01
      相关资源
      最近更新 更多