Fullscreen fix
parent
5931ed5d76
commit
fb82328535
|
@ -33,8 +33,6 @@ else if (document.documentElement.msRequestFullscreen) {
|
||||||
// Keep track of when the H5Ps where started
|
// Keep track of when the H5Ps where started
|
||||||
H5P.opened = {};
|
H5P.opened = {};
|
||||||
|
|
||||||
H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) : true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize H5P content.
|
* Initialize H5P content.
|
||||||
* Scans for ".h5p-content" in the document and initializes H5P instances where found.
|
* Scans for ".h5p-content" in the document and initializes H5P instances where found.
|
||||||
|
@ -45,6 +43,11 @@ H5P.init = function (target) {
|
||||||
H5P.$body = H5P.jQuery(document.body);
|
H5P.$body = H5P.jQuery(document.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Determine if we can use full screen
|
||||||
|
if (H5P.canHasFullScreen === undefined) {
|
||||||
|
H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) : true;
|
||||||
|
}
|
||||||
|
|
||||||
// H5Ps added in normal DIV.
|
// H5Ps added in normal DIV.
|
||||||
var $containers = H5P.jQuery('.h5p-content:not(.h5p-initialized)', target).each(function () {
|
var $containers = H5P.jQuery('.h5p-content:not(.h5p-initialized)', target).each(function () {
|
||||||
var $element = H5P.jQuery(this).addClass('h5p-initialized');
|
var $element = H5P.jQuery(this).addClass('h5p-initialized');
|
||||||
|
|
Loading…
Reference in New Issue