Fix check/use of incorrect API function

This will solve fullscreen issues in Firefox
pull/101/head
Frode Petterson 2021-05-12 12:10:51 +02:00 committed by GitHub
parent 588f096afe
commit 1c12b7bbf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ H5P.$window = H5P.jQuery(window);
H5P.instances = []; H5P.instances = [];
// Detect if we support fullscreen, and what prefix to use. // Detect if we support fullscreen, and what prefix to use.
if (document.documentElement.requestFullScreen) { if (document.documentElement.requestFullscreen) {
/** /**
* Browser prefix to use when entering fullscreen mode. * Browser prefix to use when entering fullscreen mode.
* undefined means no fullscreen support. * undefined means no fullscreen support.
@ -676,7 +676,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull
}); });
if (H5P.fullScreenBrowserPrefix === '') { if (H5P.fullScreenBrowserPrefix === '') {
$element[0].requestFullScreen(); $element[0].requestFullscreen();
} }
else { else {
var method = (H5P.fullScreenBrowserPrefix === 'ms' ? 'msRequestFullscreen' : H5P.fullScreenBrowserPrefix + 'RequestFullScreen'); var method = (H5P.fullScreenBrowserPrefix === 'ms' ? 'msRequestFullscreen' : H5P.fullScreenBrowserPrefix + 'RequestFullScreen');