如何嵌入 Google Plus 中的视频?

发布于 2024-12-05 12:06:08 字数 526 浏览 1 评论 0原文

它为我提供了“复制嵌入 HTML”代码:

<object style="height: 390px; width: 640px"><param name="movie" 

value="https://www.youtube.com/v/picasacid?version=3"><param 

name="allowFullScreen" value="true"><param name="allowScriptAccess" 

value="always"><embed src="https://www.youtube.com/v/picasacid?version=3" 

type="application/x-shockwave-flash" allowfullscreen="true" 

allowScriptAccess="always" width="640" height="390"></object>

但是当我将其放在我的博客上时,它显示“电影未加载...”。

It gives me to "Copy embed HTML" code:

<object style="height: 390px; width: 640px"><param name="movie" 

value="https://www.youtube.com/v/picasacid?version=3"><param 

name="allowFullScreen" value="true"><param name="allowScriptAccess" 

value="always"><embed src="https://www.youtube.com/v/picasacid?version=3" 

type="application/x-shockwave-flash" allowfullscreen="true" 

allowScriptAccess="always" width="640" height="390"></object>

but when I put it on my blog it says "Movie not loaded...".

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

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

发布评论

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

评论(3

〃温暖了心ぐ 2024-12-12 12:06:08

Google+ 视频存储为 Picasa 视频。它们的提供方式不允许轻松嵌入。

您可以更轻松地将它们上传到 YouTube 并使用 YouTube 代码嵌入。

如果您必须使用 Google+ 版本,则无法在 Google+ Feed 中使用播放器代码,因为视频流网址每 11 小时就会过期。

我在网站中通过定期检索视频的 RSS 提要

https://picasaweb.google.com/data/feed/tiny/user/<<the video poster's userid>>/photoid/<<the video's id>>

并提取 来完成此操作。
您可以使用 Google Picasa Api 轻松实现此目的。我进行 AJAX 调用来获取每个用户访问的流 URL,但访问者很少。

您会获得每种视频格式的 URL。

您可以使用这些网址来替换通过检查 Google+ 播放器获得的嵌入代码中的网址。

<embed width="800" height="600" flashvars="fs=1&hl=en&autoplay=1&ps=picasaweb&fmt_list=<<your fmt_list>>&fmt_stream_map=<<your fmt_stream_map>>&playerapiid=uniquePlayerId&video_id=picasacid&t=1&vq=large&auth_timeout=86400000000" wmode="opaque" scale="noScale" bgcolor="#fff" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="//www.youtube.com/get_player?enablejsapi=1&vq=hd720">

URL 通过嵌入的 flashvar 属性传递给播放器。您需要替换视频格式列表参数:fmt_list 和流 URL 列表:fmt_stream_map

请记住,flashvar 属性的内容是经过 urlencode 编码的,而您在 flashvar 属性内发送的 fmt_listfmt_stream_map 的内容,也进行了 urlencoded,因此 fmt_listfmt_stream_map 最终进行了双重 urlencoded。

我希望我说得足够明确。

Google+ videos are stored as Picasa videos. They are served in a way that does not allow for easy embedding.

It would be easier for you to upload them to YouTube and embed using the YouTube code.

If you must use the Google+ version you can't use the player code in your Google+ feed because the video stream URL expires every 11 hours.

I did it in my website by periodically retrieving the video's RSS feed

https://picasaweb.google.com/data/feed/tiny/user/<<the video poster's userid>>/photoid/<<the video's id>>

and extracting the <media:content url="<<video source url>>">.
You can easily achieve this using the Google Picasa Api. I make an AJAX call to get the stream URLs on each user's visit but I have very few visitors.

You get a URL for each video format.

You use these URLs to replace the URLs from the embed code you can get from inspecting the Google+ player.

<embed width="800" height="600" flashvars="fs=1&hl=en&autoplay=1&ps=picasaweb&fmt_list=<<your fmt_list>>&fmt_stream_map=<<your fmt_stream_map>>&playerapiid=uniquePlayerId&video_id=picasacid&t=1&vq=large&auth_timeout=86400000000" wmode="opaque" scale="noScale" bgcolor="#fff" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="//www.youtube.com/get_player?enablejsapi=1&vq=hd720">

The URLs are passed to the player in the embed's flashvar attribute. You need to replace the video formats list parameter: fmt_list and the stream URLs list : fmt_stream_map.

Keep in mind that the contents of the flashvar attributes are urlencoded and the contents of the fmt_list and fmt_stream_map, which you send inside the flashvar attribute, are also urlencoded so the fmt_list and fmt_stream_map end up doubly urlencoded.

I hope I was explicit enough.

似最初 2024-12-12 12:06:08

我认为你需要告诉播放器在加载之前加载哪个视频。上面嵌入代码中的网址指向播放器,而不是视频。

I think you need to tell the player which video to load before it does. The urls in the embed code above point to the player, not the video.

旧情勿念 2024-12-12 12:06:08

您可以尝试直接从视频的 google plus 页面中提取 HTML,检查显示视频的页面的 DOM。

我不明白是否允许发布链接,但我会尝试。这是我博客的一个页面,描述了我是如何做到的。
http://www.nicassio.it/daniele/blog/?p=27

无论如何,这是一种黑客行为,谷歌似乎不希望我们在 G+ 之外分享这些视频。

You can try to extract the HTML directly from the google plus page of the video, inspecting the DOM of the page that shows the video.

I don't understand if it is allowed to post links, but i'll try. This is a page of my blog which describes how I did it.
http://www.nicassio.it/daniele/blog/?p=27

Anyway, it's a kind of hack, it seems Google doesn't want us to share those videos outside G+.

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