HFP-1905 Add metadata to contentData
parent
0fb35a3f7c
commit
011c7df675
|
@ -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!
|
||||
|
|
Loading…
Reference in New Issue