Add back custom libraries URL (Needed for Moodle)

pull/58/head 1.22.0
Frode Petterson 2019-03-12 12:47:31 +01:00
parent 71038f89ea
commit d05bc94d92
1 changed files with 7 additions and 1 deletions

View File

@ -1937,7 +1937,13 @@ H5P.libraryFromString = function (library) {
* The full path to the library.
*/
H5P.getLibraryPath = function (library) {
return H5PIntegration.url + '/libraries/' + library;
if (H5PIntegration.urlLibraries !== undefined) {
// This is an override for those implementations that has a different libraries URL, e.g. Moodle
return H5PIntegration.urlLibraries + '/' + library;
}
else {
return H5PIntegration.url + '/libraries/' + library;
}
};
/**