From 8ab9188bdb1f2755db255404b2fd8a86ac4e092d Mon Sep 17 00:00:00 2001 From: Theodore Abshire Date: Fri, 10 Feb 2017 13:23:13 -0800 Subject: [PATCH] Expanded the fullscreen polyfill. Now it includes fullscreenEnabled. Closes #669 Change-Id: I7df3c422ecc72215a48ba72ac57aae2bc9b600d5 --- lib/polyfill/fullscreen.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/polyfill/fullscreen.js b/lib/polyfill/fullscreen.js index 0b1bed31fd..27729dcdd1 100644 --- a/lib/polyfill/fullscreen.js +++ b/lib/polyfill/fullscreen.js @@ -59,6 +59,13 @@ shaka.polyfill.Fullscreen.install = function() { document.webkitFullscreenElement; } }); + Object.defineProperty(document, 'fullscreenEnabled', { + get: function() { + return document.mozFullScreenEnabled || + document.msFullscreenEnabled || + document.webkitFullscreenEnabled; + } + }); } var proxy = shaka.polyfill.Fullscreen.proxyEvent_;