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

问题描述

我有一个页面有一个iframe播放视频。当有人在Facebook上分享链接时,我希望它可以在墙上播放。

I have a page that has an iframe for playing video. When someone shares the link on Facebook, I would like it to play inline on their wall.

我尝试过各种各样的Facebook标签,没有任何效果。当您分享链接时,您可以使用播放叠加层获得图像,但是当您点击它时,没有任何反应。当我右键点击图片时,它显示Movie not loaded ...

I have tried quite a variety of facebook tags and nothing seems to work. When you share the link, you get the image with the playback overlay, but when you click it nothing happens. When I right click on the image, it shows 'Movie not loaded...'

这是我的来源:

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Proposal</title>

<meta name="description" content="A mograph marriage proposal. Awesome!&nbsp; With some great animated typography. Congrats Adam Rosenbaum!" />

<meta property="og:title" content="Proposal" />
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://laurafolco.com/video/video.html" />
<meta property="og:image" content="http://laurafolco.com/video/Proposal.jpg" />
<meta property="og:description" content="A mograph marriage proposal. Awesome!&nbsp; With some great animated typography. Congrats Adam Rosenbaum!" />
<meta property="og:video" content="https://player.vimeo.com/video/98891632?portrait=0" />
<meta property="og:video:width" content="700" />
<meta property="og:video:height" content="394" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

</head>

<body>

<p>A mograph marriage proposal. Awesome!&nbsp; Congrats <a href="https://vimeo.com/user3254596" rel="author">Adam Rosenbaum</a>!</p>
<div class="media_embed"><iframe src="//player.vimeo.com/video/98891632?portrait=0" frameborder="0" width="700" height="394"></iframe></div>
<p>&nbsp;</p>
<h4>Author Notes</h4>
<p>On 6.21.14 I showed this to my girlfriend. She said yes.</p>
<p>Music: Devotchka</p>

</body>
</html>

网址是

是否可以共享上述链接,并有视频播放内联吗?或者用户是否需要共享实际的视频链接?

Is it possible to share the above link, and have the video play inline? or would the user need to share the actual video link?

推荐答案

想想我需要先指定Vimeo Flash URL,像这样:

Figured out that I need to specify the Vimeo flash URL first, like this:

<meta property="og:video" content="https://vimeo.com/moogaloop.swf?clip_id=98891632" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="700" />
<meta property="og:video:height" content="394" />

<meta property="og:video" content="https://player.vimeo.com/video/98891632?portrait=0" />
<meta property="og:video:type" content="video/mp4" />
<meta property="og:video:width" content="700" />
<meta property="og:video:height" content="394" />

Vimeo说他们的Flash API已被弃用,但似乎有效。

Vimeo says that their flash API is deprecated, but it seems to work.

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

09-15 14:17