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

时间:2011-09-12 22:49:23

标签: facebook video stream inline jwplayer

我的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流中出现的缩略图并没有像往常那样链接到视频的页面,我将其视为我在正确的轨道上的标志。但是,它也不播放视频:)小蓝色播放按钮也不会显示在我的缩略图上。

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

2 个答案:

答案 0 :(得分:0)

如果您使用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

答案 1 :(得分:-1)

我遇到了同样的问题,但我解决了这个问题 我不知道哪个标签解决了我的问题,但是当我的代码看起来像这样时,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" />