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

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

问题描述

我已经为我们的学生电视台建了一个网站,这个概念和YouTube很相似。我们希望我们的视频可以在Facebook上直接播放,分享时,视频本身仍然托管在我们的服务器上,而且我们的统计信息将被更新。



网站上的播放器使用videojs,并且都在使用html5视频标签。还有一个可嵌入版本的玩家可以在iframe中运行。理想情况下,我希望在Facebook上使用,但不要以为可能。这是我现在尝试的og:video:type值设置为text / html和og:video设置为embeddable播放器的url,它似乎不起作用。 以下是一个示例页面这里是可嵌入的播放器



我看到的唯一其他方法是为视频指定一个网址文件或网址到Flash播放器。



我们所有的视频都以不同的质量/分辨率渲染,在我们的网站和嵌入式播放器上有一个质量选择栏更改播放器中的视频网址。然而,看起来像opengraph和Facebook,没有办法给它的不同质量的urls或让用户在Facebook上选择他们想要的,这意味着我们被迫强迫大家看看其中一个品质。这是对的吗?



所以,唯一可以看到的其他选项是构建一个内置质量选择的自定义Flash播放器。从我可以告诉这是YouTube正在做什么这是唯一的选择,因为我不想为Facebook建立一个自定义的Flash播放器,然后在几个月内决定他们不支持flash?



我知道类似的问题已经被问到了,但是我找不到一个确定的答案,其中一些是一年以上。



谢谢。

解决方案

Facebook目前正在使用YouTube查看iframe。希望支持将很快推出给大家。



此问题的更多信息:嵌入视频播放器html5 iframe在Facebook分享像YouTube


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.

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.

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

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?

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.

Thanks.

解决方案

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

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

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

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