以HTML5格式嵌入Vimeo视频的好方法是什么? [英] What is a good way to embed Vimeo videos in HTML5 format?

查看:181
本文介绍了以HTML5格式嵌入Vimeo视频的好方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想以Flash格式嵌入Vimeo视频。如何以HTML5格式嵌入它们?

I don't want to embed Vimeo videos in Flash format. How do I embed them in HTML5 format?

推荐答案

它们实际上是通过cookie启用HTML5,所以我认为你不能链接直接到HTML5版本。这是他们用来在Flash和HTML5之间切换的JS代码:

They actually enable HTML5 through cookies, so I don't think you can link directly to the HTML5 version. Here's the JS code they use to switch between Flash and HTML5:

function toggle_html5_player(obj, on) {
    if (on) {
        setCookie("html_player", 1, 365);
    } else {
        setCookie("html_player", 0, 365);
    }
    reload_page();
}



编辑:



关于嵌入,官方博客文章指出:

Also on embedding, the official blog post states:


它现在仅适用于Vimeo.com,嵌入代码仍然是Flash

It only works on Vimeo.com right now, embed code will still be Flash



编辑2:



实际上,这是一个旧的陈述,而不是真的了。如果设置了上述cookie,新嵌入式实际上会在不支持Flash的设备(如iPad或iPod)上自动使用HTML5。

Edit 2:

Actually, that is an old statement which is not true anymore. The new embeds actually use HTML5 automatically on devices that don't support Flash like the iPad or iPod, if the aforementioned cookie is set.

这篇关于以HTML5格式嵌入Vimeo视频的好方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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