【发布时间】:2016-04-20 05:24:43
【问题描述】:
我正在使用 v3 youtube API 根据其 id 获取视频数据。
这是我目前的搜索:
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,status&id=QGGyYVsEGGo&key=<my_key>
我包含的视频 ID 是我很好奇的特殊情况。它返回一个包含以下信息的状态属性:
status: {
uploadStatus: "processed",
privacyStatus: "public",
license: "youtube",
embeddable: true,
publicStatsViewable: true
}
根据documentationstatus.embeddable属性...
" indicates whether the video can be embedded on another website."
如果您查看此 JSFiddle (https://jsfiddle.net/tewj3xco/),我使用他们的 iframe 播放器显示与上述相同的视频,它说 NFL 已阻止它。我想知道是否有不同或更可靠的属性来检查是否可以嵌入来自 youtube 的视频。
【问题讨论】:
标签: javascript video youtube-api youtube-data-api