Reputation: 25016
I don't want to embed Vimeo videos in Flash format. How do I embed them in HTML5 format?
Upvotes: 3
Views: 11534
Reputation: 314
On a browser with the Flash Player it loads in HTML5 mode with the following code:
<iframe sandbox="allow-same-origin allow-scripts allow-popups"
id="foo" width="100%" height="90%"
allowfullscreen="" webkitallowfullscreen="" mozallowfullscreen=""
src="http://player.vimeo.com/video/28544156?api=1">
</iframe>
The sandbox prevents the HTML iframe tag from accessing any plugins including flash.
To allow the vimeo button to open the vimeo web page for the video you need the 'allow-popups' permission. It's not needed to play the video.
Upvotes: 4
Reputation: 8284
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:
It only works on Vimeo.com right now, embed code will still be Flash
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.
Upvotes: 2