aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2015-07-25 20:29:19 +1000
committerSam Potts <me@sampotts.me>2015-07-25 20:29:19 +1000
commita0d2d5cd2445b226470f724a5fa9628a52bc9c14 (patch)
tree34508746bb2e65fc4b0b905e643c86df52131620 /src/js
parente9cdbfb8da156ded3b11ca1a3e5bd29104ee565a (diff)
downloadplyr-a0d2d5cd2445b226470f724a5fa9628a52bc9c14.tar.lz
plyr-a0d2d5cd2445b226470f724a5fa9628a52bc9c14.tar.xz
plyr-a0d2d5cd2445b226470f724a5fa9628a52bc9c14.zip
Minor tweaks
Diffstat (limited to 'src/js')
-rw-r--r--src/js/plyr.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 1c9c98a8..fba43477 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -559,9 +559,8 @@
fullscreen.isFullScreen = function(element) {
if(typeof element == "undefined") {
- element = document;
+ element = document.body;
}
-
switch (this.prefix) {
case "":
return document.fullscreenElement == element;
@@ -572,6 +571,9 @@
}
};
fullscreen.requestFullScreen = function(element) {
+ if(typeof element == "undefined") {
+ element = document.body;
+ }
return (this.prefix === "") ? element.requestFullScreen() : element[this.prefix + (this.prefix == "ms" ? "RequestFullscreen" : "RequestFullScreen")]();
};
fullscreen.cancelFullScreen = function() {