如何嵌入 jwplayer 以便它在 Facebook 流中内联播放?

发布于 2024-12-04 03:46:32 字数 1546 浏览 1 评论 0原文

我的 jwplayer 上有一个自定义皮肤,我试图让它在 Facebook 流中内联播放,就像 YouTube 播放器一样。我花了两天时间查看文档并调整代码,但无法弄清楚我做错了什么。这是我的元标记的示例:

<meta property="og:site_name" content="Contour"/> 
<meta property="fb:app_id" content="188896031148408"/> 
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://www.contour.com/stories/jimmy-the-greek-board-view-of-summer-x-park-course"/> 
<meta property="og:title" content="Jimmy the Greek board view of Summer X park course"/> 
<meta property="og:video" content="http://www.contour.com/flash/jwplayer.swf?playlistfile=/stories/39073.xml&skin=/flash/jwskin.zip&repeat=list&autostart=true"/> 
<meta property="og:video:type" content="application/x-shockwave-flash"/> 
<meta property="og:image" content="http://s3.amazonaws.com/contour.staging/images/assets/12133/quarter/F71C41BCA5B9825898ECBC56151E8BB820100905-94257-1dzxruc-0.jpg"/> 
<meta property="og:description" content="Jimmy the Greek Marcus was kind enough to bust out a few warm up laps with a boardcam mount. This years setup was primarily cement with some skatelite features around the perimeter. Thanks man, you killed it on Sunday"/> 

facebook url linter 显示它正在获取信息。甚至还有一个“视频”标题,上面写着“状态:Facebook 上的视频嵌入已启用”。然而,它不起作用。

我尝试使用“video”和“swf”作为 og:type。我尝试指定视频高度/宽度。我尝试过使用不同的视频类型。当我在浏览器中加载 og:video url 时,我会得到一个自动播放视频的 swf。

现在,Facebook 流中显示的缩略图并未像平常那样链接到视频页面,我认为这表明我走在正确的轨道上。但是,它也不会播放视频:) 蓝色的小播放按钮也没有出现在我的缩略图上。

任何想法将不胜感激。谢谢!

I have a custom skin on my jwplayer and I'm trying to get it to play inline in the facebook stream, like the youtube player. I've spent two days looking at docs and tweaking code for this and can't figure out what I'm doing wrong. Here's an example of my meta tags:

<meta property="og:site_name" content="Contour"/> 
<meta property="fb:app_id" content="188896031148408"/> 
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://www.contour.com/stories/jimmy-the-greek-board-view-of-summer-x-park-course"/> 
<meta property="og:title" content="Jimmy the Greek board view of Summer X park course"/> 
<meta property="og:video" content="http://www.contour.com/flash/jwplayer.swf?playlistfile=/stories/39073.xml&skin=/flash/jwskin.zip&repeat=list&autostart=true"/> 
<meta property="og:video:type" content="application/x-shockwave-flash"/> 
<meta property="og:image" content="http://s3.amazonaws.com/contour.staging/images/assets/12133/quarter/F71C41BCA5B9825898ECBC56151E8BB820100905-94257-1dzxruc-0.jpg"/> 
<meta property="og:description" content="Jimmy the Greek Marcus was kind enough to bust out a few warm up laps with a boardcam mount. This years setup was primarily cement with some skatelite features around the perimeter. Thanks man, you killed it on Sunday"/> 

The facebook url linter shows that it's picking up the info. There's even a 'video' heading that says "Status: Video embedding on Facebook enabled". Yet, it doesn't work.

I've tried using 'video' and 'swf' as the og:type. I've tried specifying the video height/width. I've tried using different video types. When I load the og:video url in a browser I get a swf that autoplays my video.

Right now, the thumbnail that appears in the facebook stream does NOT link to the video's page as it normally would, which I take as a sign that I'm on the right track. However, it also does not play a video :) The little blue play button also does not show up on my thumbnail.

Any ideas would be greatly appreciated. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冰葑 2024-12-11 03:46:32

如果您使用 jwplayer swf 对象直接播放您的 YouTube 视频
您应该使用 URL-ENCODE 方法对您的参数进行编码。像这样:

http://yoursite.com/player.swf?file=http%3A%2F%2Fyoutube.com%2Fwatch%3Fv%3DB-YRHQN5e9Q&image=http%3A%2F%2Fi1.ytimg.com%2Fvi%2FB-YRHQN5e9Q%2Fhqdefault.jpg&autostart=true

If you use jwplayer swf object to play directly your youtube video
You should encode your param with URL-ENCODE method. Like that:

http://yoursite.com/player.swf?file=http%3A%2F%2Fyoutube.com%2Fwatch%3Fv%3DB-YRHQN5e9Q&image=http%3A%2F%2Fi1.ytimg.com%2Fvi%2FB-YRHQN5e9Q%2Fhqdefault.jpg&autostart=true
心奴独伤 2024-12-11 03:46:32

我也遇到了同样的问题,不过我已经解决了。
我不知道哪个标签可以解决我的问题,但是当我的代码如下所示时,jw player 5.1 pro 正在 facebook 上运行:

<html xmlns:fb="http://ogp.me/ns/fb#">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<script type="text/javascript" src="/embeds/jwplayer5/swfobject.js"></script>
 <meta property="og:type"        content="video.movie" /> 
<meta property="og:video:height" content="260" /> 
<meta property="og:video:width" content="420" /> 
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:title" content="Big Buck Bunny" /> 
<meta property="og:description" content="Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation." />
<meta property="fb:admins" content="100000446876505">
  <meta property="fb:app_id" content="257720611082074">
<meta property="og:image" content="http://zobolio.com/embeds/posters/ezekiel.png" />
<meta property="og:video" content="http://zobolio.com/embeds/jwplayer/player.swf?file=http%3A%2F%2Fwww.zobolio.com/embeds/ezekiel.mp4&autostart=true" /> 
<meta property="og:video:secure_url" content="https://zobolio.com/embeds/jwplayer5/player.swf?file=http%3A%2F%2Fwww.zobolio.com/embeds/ezekiel.mp4&autostart=true" />

I haved the same problem, but I solved this.
I have no idea which tag solve my problem, but when my code is looks like this, jw player 5.1 pro is working on facebook:

<html xmlns:fb="http://ogp.me/ns/fb#">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<script type="text/javascript" src="/embeds/jwplayer5/swfobject.js"></script>
 <meta property="og:type"        content="video.movie" /> 
<meta property="og:video:height" content="260" /> 
<meta property="og:video:width" content="420" /> 
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:title" content="Big Buck Bunny" /> 
<meta property="og:description" content="Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation." />
<meta property="fb:admins" content="100000446876505">
  <meta property="fb:app_id" content="257720611082074">
<meta property="og:image" content="http://zobolio.com/embeds/posters/ezekiel.png" />
<meta property="og:video" content="http://zobolio.com/embeds/jwplayer/player.swf?file=http%3A%2F%2Fwww.zobolio.com/embeds/ezekiel.mp4&autostart=true" /> 
<meta property="og:video:secure_url" content="https://zobolio.com/embeds/jwplayer5/player.swf?file=http%3A%2F%2Fwww.zobolio.com/embeds/ezekiel.mp4&autostart=true" />

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文