diff --git a/js/h5p.js b/js/h5p.js index 3b1fa97..7101e89 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -102,7 +102,14 @@ H5P.fullScreen = function ($el, obj) { }; /** - * Find the path to the content files base on the id of the content. + * Find the path to the content files based on the id of the content + * + * Also identifies and returns absolute paths + * + * @param string path + * Absolute path to a file, or relative path to a file in the content folder + * @param contentId + * Id of the content requesting a path */ H5P.getPath = function (path, contentId) { if (path.substr(0, 7) === 'http://' || path.substr(0, 8) === 'https://') { @@ -112,6 +119,19 @@ H5P.getPath = function (path, contentId) { return H5PIntegration.getContentPath(contentId) + path; }; +/** + * THIS FUNCTION IS DEPRECATED, USE getPath INSTEAD + * + * Find the path to the content files folder based on the id of the content + * + * @param contentId + * Id of the content requesting a path + */ +H5P.getContentPath = function (contentId) { + return H5PIntegration.getContentPath(contentId); +}; + + // // Used from libraries to construct instances of other libraries' objects by // name.