Merge branch 'master' into smart-file-names

redesign-copyrights
Frode Petterson 2015-03-13 13:05:20 +01:00
commit c7a7a99590
1 changed files with 5 additions and 2 deletions

View File

@ -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');