我不能100%确定Youtube的端点是否有问题,如果我做错了。
当我在WordPress中嵌入Youtube视频时出现了问题。我通过WordPress核心进行了所有调试,并将其缩小到Youtube端点的响应,该端点从youtube返回oEmbed。
端点:
https://www.youtube.com/oembed?maxwidth=640&maxheight=960&url=youtu.be%2FI0dQx4SNSwE&format=json
回应(原始):
{"thumbnail_height": 360, "width": 640, "thumbnail_width": 480, "provider_url": "http:\/\/www.youtube.com\/", "html": "\u003ciframe width=\"640\" height=\"360\" src=\"http:\/\/www.youtube.com\/embed\/I0dQx4SNSwE?feature=oembed\" frameborder=\"0\" allowfullscreen\u003e\u003c\/iframe\u003e)", "height": 360, "type": "video", "version": "1.0", "title": "Why Do We Yawn?", "author_name": "AsapSCIENCE", "thumbnail_url": "http:\/\/i1.ytimg.com\/vi\/I0dQx4SNSwE\/hqdefault.jpg", "provider_name": "YouTube", "author_url": "http:\/\/www.youtube.com\/user\/AsapSCIENCE"}
回复:(格式化)
{
"thumbnail_height": 360,
"version": "1.0",
"provider_name": "YouTube",
"thumbnail_url": "http://i1.ytimg.com/vi/I0dQx4SNSwE/hqdefault.jpg",
"title": "Why Do We Yawn?",
"html": "<iframe width=\"640\" height=\"360\" src=\"http://www.youtube.com/embed/I0dQx4SNSwE?feature=oembed\" frameborder=\"0\" allowfullscreen></iframe>)",
"provider_url": "http://www.youtube.com/",
"type": "video",
"height": 360,
"author_url": "http://www.youtube.com/user/AsapSCIENCE",
"thumbnail_width": 480,
"author_name": "AsapSCIENCE",
"width": 640
}
正如您在“html&#39;”结尾处所看到的那样。属性有一个额外的&#34; / iframe \ u003e)&#34;
我做错了什么或者Youtube有什么问题吗?我不知所措。我真的很想Youtube足够聪明,不能回报这样的东西,所以我不得不认为这是我做错了...
答案 0 :(得分:1)
看到这个类似的问题,看起来像一个已知的错误:
https://productforums.google.com/forum/#!topic/youtube/1jGhK-g8r4E