我正在使用v3 youtube API根据其ID获取视频数据 .
这是我目前的搜索:
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,status&id=QGGyYVsEGGo&key=<my_key>
我包含的视频ID是我很好奇的特殊情况 . 它返回一个status属性,其中包含以下信息:
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的视频 .
1 回答
根据this answer,无法通过API获取此信息 .