diff --git a/js/h5p.js b/js/h5p.js index dd74a79..34a1223 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -99,7 +99,8 @@ H5P.init = function (target) { } var library = { library: contentData.library, - params: JSON.parse(contentData.jsonContent) + params: JSON.parse(contentData.jsonContent), + metadata: contentData.metadata }; H5P.getUserData(contentId, 'state', function (err, previousState) { @@ -795,6 +796,10 @@ H5P.newRunnable = function (library, contentId, $attachTo, skipResize, extras) { extras.previousState = library.userDatas.state; } + if (library.metadata) { + extras.metadata = library.metadata; + } + // Makes all H5P libraries extend H5P.ContentType: var standalone = extras.standalone || false; // This order makes it possible for an H5P library to override H5P.ContentType functions!