在 facebook 上使用 opengraph 嵌入 html5 视频 [英] Embedding html5 video with opengraph on facebook

查看:32
本文介绍了在 facebook 上使用 opengraph 嵌入 html5 视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我们的学生电视台建立了一个网站,其概念与 youtube 非常相似.我们希望我们的视频在分享时可以直接在 Facebook 中播放,而视频本身仍托管在我们的服务器上,并且我们的统计数据也在更新.

I have built a web site for our student tv station and the concept is pretty similar to youtube. We would like for our videos to be playable directly in facebook when shared, with the videos themselves still hosted on our server and our stats being updated.

网站上的播放器使用videojs,并且都使用html5 video 标签.还有一个可在 iframe 中运行的播放器的可嵌入版本.理想情况下,我希望在 facebook 上使用它,但认为这是不可能的.这是我目前尝试将 og:video:type 值设置为 text/html 并将 og:video 设置为可嵌入播放器 url 的方法,但它似乎不起作用.这是一个示例页面这是它的可嵌入播放器.

The player on the site uses videojs and is all working with the html5 video tag. There is also an embeddable version of the player that can run in an iframe. Ideally I'd like this to be used on facebook but don't think it's possible. This is what I've attempted at the moment with the og:video:type value set to text/html and og:video set to the embeddable player url and it doesn't appear to work. Here is an example page, and here is the embeddable player for it.

我见过的唯一其他方法是指定视频文件的网址或 Flash 播放器的网址.

The only other ways I've seen is to specify a url to the video file, or a url to a flash player.

我们所有的视频都以不同的质量/分辨率呈现,在我们的网站和可嵌入播放器上,有一个质量选择栏可以更改播放器中的视频网址.然而,对于 opengraph 和 facebook 来说,似乎无法为其提供不同质量的 url 或让用户在 facebook 上选择他们想要的那个,这意味着我们坚持强迫每个人观看其中一种质量.对吗?

All of our videos are rendered at different qualities/resolutions and on our site and embeddable player there is a quality selection bar that changes the video url in the player. However it looks like with opengraph and facebook there is no way of giving it the urls to the different qualities or having the user pick the one they want on facebook, meaning we're stuck with forcing everyone to watch at one of the qualities. Is this right?

因此,似乎唯一可用的其他选项是构建一个内置质量选择的自定义 Flash 播放器.据我所知,这就是 youtube 正在做的事情.这是唯一的选择吗,因为我不想为 Facebook 构建一个自定义的 Flash 播放器,然后在几个月后决定他们不再支持 Flash?

So then the only other option that appears to be available is building a custom flash player which has quality selection built into it. From what I can tell this is what youtube is doing. Is this the only option though because I don't want to build a custom flash player for Facebook to then decide in a few months that they're not supporting flash anymore?

我意识到已经有人问过类似的问题,但我找不到明确的答案,其中一些问题已经超过一年了.

I realise similar questions have been asked already but I couldn't find a definite answer and some of them were over a year old.

谢谢.

推荐答案

Facebook 目前正在 YouTube 上试用 iframe.希望这种支持很快就会推广到所有人.

Facebook is currently trialing iframes with YouTube. Hopefully the support will be rolled out to everyone soon.

关于这个问题的更多信息:嵌入视频播放器facebook 中的 html5 iframe 像 YouTube 一样分享

More info at this question: Embedding video player html5 iframe in facebook share like YouTube

这篇关于在 facebook 上使用 opengraph 嵌入 html5 视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆