Javascript 为什么不是';你有没有看过youtube视频?
为什么oembed没有播放youtube视频? 我正在使用以下代码:Javascript 为什么不是';你有没有看过youtube视频?,javascript,jquery,youtube,google-api,oembed,Javascript,Jquery,Youtube,Google Api,Oembed,为什么oembed没有播放youtube视频? 我正在使用以下代码: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FriendsConnect | Find Friends</title> <!--Start FC online dependincies--> <script src="http://friendsconnect.org/jquery_cust
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FriendsConnect | Find Friends</title>
<!--Start FC online dependincies-->
<script src="http://friendsconnect.org/jquery_custom/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="http://friendsconnect.org/jquery_custom/js/jquery-ui-1.8.7.custom.min.js" type="text/javascript"></script>
<link href="http://friendsconnect.org/jquery_custom/css/fc-blue/jquery-ui-1.8.7.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../secure_serv/users/oembed/jquery.oembed.js"></script>
<!--End FC online dependancies-->
<script>
$(document).ready(function() {
$("button").button();
$(".radio").buttonset();
$(".oembed").oembed("http://www.flickr.com/photos/14516334@N00/345009210/");
$("input:button").button();
});
</script>
<style type="text/css">
.style1
{
width: 83px;
}
.style2
{
width: 144px;
}
#Button1
{
font-size: 9px;
}
a:link {
text-decoration: none;
color: #000000;
}
a {
text-decoration: none;
color: #091419;
}
a:visited {
color: #091419;
}
a:hover {
text-decoration: underline;
color: #091419;
}
</style>
<style type="text/css">
html,
body {background-color: transparent;}
</style>
</head>
<body style="font-family: Arial, Helvetica, sans-serif;">
<a href="http://www.youtube.com/watch?v=INVdbXTuPVI&feature=feedu" class="oembed">ssss</a>
<div id="container"></div>
</body>
</html>
朋友联系|找朋友
$(文档).ready(函数(){
$(“按钮”).button();
$(“.radio”).buttonset();
$(“.oembed”).oembed(”http://www.flickr.com/photos/14516334@N00/345009210/”;
$(“输入:按钮”).button();
});
.style1
{
宽度:83px;
}
.style2
{
宽度:144px;
}
#按钮1
{
字体大小:9px;
}
a:链接{
文字装饰:无;
颜色:#000000;
}
a{
文字装饰:无;
颜色:#091419;
}
a:参观了{
颜色:#091419;
}
a:悬停{
文字装饰:下划线;
颜色:#091419;
}
html,
正文{背景色:透明;}
由于某些原因,它不会显示嵌入式播放器。为什么会这样?我认为这是因为有些视频没有启用oembed/json 如果您尝试嵌入,它会起作用。但是你试图嵌入的视频不起作用 对于第一个链接,您将获得401个未经授权的数据,对于下面的第二个链接,您将获得json数据: http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=bDOYN-6gdRE
有关这方面的更多详细信息,请参阅。您是对的,在我进一步查看之后,我发现该视频不可嵌入。(如果这是一个单词lol)oEmbed不会返回正确的缩略图。示例“INVdbXTuPVI”。上面写着“缩略图url”:https://i.ytimg.com/vi/INVdbXTuPVI/hqdefault.jpg“。但正确的做法是:上传401个未经授权的视频,但上传者上传的其他视频没有。(我认为你的例子不再给出401。)