From 35e052352e96872d4bdbc9de9e5efb63f1aa712a Mon Sep 17 00:00:00 2001 From: Andre DeMarre Date: Mon, 20 Nov 2017 12:00:36 -0800 Subject: [PATCH] Add 'allow="vr"' Feature Policy attribute to iframe to permit WebVR in cross-origin iframes https://github.com/w3c/webvr/issues/86 https://developers.google.com/web/updates/2017/09/webvr-origin-trial-chrome-62 https://bugs.chromium.org/p/chromium/issues/detail?id=666767 --- src/api/player.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/player.js b/src/api/player.js index e4176c2a..16370be6 100644 --- a/src/api/player.js +++ b/src/api/player.js @@ -163,6 +163,7 @@ Player.prototype.createIframe_ = function(contentInfo) { var iframe = document.createElement('iframe'); iframe.setAttribute('allowfullscreen', true); iframe.setAttribute('scrolling', 'no'); + iframe.setAttribute('allow', 'vr'); iframe.style.border = 0; // Handle iframe size if width and height are specified.