Added checking for fullscreen.

namespaces
Frode Petterson 2013-04-11 14:59:33 +02:00
parent d485247165
commit 57cc64f28c
2 changed files with 2 additions and 1 deletions

View File

@ -263,6 +263,7 @@ class H5PValidator {
'w' => '/^[0-9]{1,4}$/',
'h' => '/^[0-9]{1,4}$/',
'embedTypes' => array('iframe', 'div'),
'fullscreen' => '/^(0|1)$/',
);
/**

View File

@ -32,7 +32,7 @@ H5P.init = function () {
var obj = new (H5P.classFromName($el.data('class')))(H5P.jQuery.parseJSON(H5PIntegration.getJsonContent(contentId)), contentId);
obj.attach($el);
if (true/* fullscreen */) {
if (H5PIntegration.getFullscreen(contentId)) {
H5P.jQuery('<div class="h5p-content-controls"><a href="#" class="h5p-enable-fullscreen">Enable fullscreen</a><div>').insertBefore($el).children().click(function () {
H5P.fullScreen($el, obj);
return false;