"Embeddable" 无法嵌入 youtube 视频
"Embeddable" youtube video can't be embedded
我正在使用 v3 youtube API 根据其 ID 获取视频数据。
这是我当前的搜索:
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,status&id=QGGyYVsEGGo&key=<my_key>
我包含的视频 ID 是我很好奇的特殊情况。它 returns 状态 属性 具有以下信息:
status: {
uploadStatus: "processed",
privacyStatus: "public",
license: "youtube",
embeddable: true,
publicStatsViewable: true
}
根据 documentation status.embeddable
属性...
" indicates whether the video can be embedded on another website."
如果你看一下这个 JSFiddle (https://jsfiddle.net/tewj3xco/),我用他们的 iframe 播放器显示了与上面相同的视频,它说 NFL 已经阻止了它。我想知道是否有不同的或更可靠的 属性 来检查是否可以嵌入来自 YouTube 的视频。
根据this answer,无法通过API获取此信息。
A small subset of videos have domain-level whitelists or blacklists applied to them by their content owners. Those restrictions are not reflected in API responses.
我正在使用 v3 youtube API 根据其 ID 获取视频数据。
这是我当前的搜索:
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,status&id=QGGyYVsEGGo&key=<my_key>
我包含的视频 ID 是我很好奇的特殊情况。它 returns 状态 属性 具有以下信息:
status: {
uploadStatus: "processed",
privacyStatus: "public",
license: "youtube",
embeddable: true,
publicStatsViewable: true
}
根据 documentation status.embeddable
属性...
" indicates whether the video can be embedded on another website."
如果你看一下这个 JSFiddle (https://jsfiddle.net/tewj3xco/),我用他们的 iframe 播放器显示了与上面相同的视频,它说 NFL 已经阻止了它。我想知道是否有不同的或更可靠的 属性 来检查是否可以嵌入来自 YouTube 的视频。
根据this answer,无法通过API获取此信息。
A small subset of videos have domain-level whitelists or blacklists applied to them by their content owners. Those restrictions are not reflected in API responses.