浏览代码

trick vimeo to do html5 embeds on firefox.

somehow the html5 support detection is some sort of broken. by
sandboxing the iframe to not allow access to plugins, vimeo falls back
to html5. nice.

http://stackoverflow.com/questions/12395981/force-vimeo-html5-video-embed#18454686
Lucas Stadler 11 年之前
父节点
当前提交
e20af61104
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      js/babl/public/index.html

+ 2 - 1
js/babl/public/index.html

@ -51,7 +51,8 @@
51 51
				re: /https?:\/\/vimeo.com\/([0-9]+).*/,
52 52
				fn: function(match) {
53 53
					var el = document.createElement("iframe");
54
					el.src = "http://player.vimeo.com/video/" + match[1];
54
					el.src = "//player.vimeo.com/video/" + match[1];
55
					el.sandbox = "allow-same-origin allow-scripts allow-popups";
55 56
					el.width = 420;
56 57
					el.height = 315;
57 58
					el.setAttribute("frameborder", 0);