diff --git a/js/h5p.js b/js/h5p.js index 4df6f3d..3b1fa97 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -104,9 +104,12 @@ H5P.fullScreen = function ($el, obj) { /** * Find the path to the content files base on the id of the content. */ -H5P.getContentPath = function(contentId) { - // TODO: Rewrite or remove... H5P.getContentPath = H5PIntegration.getContentPath would probably work f.i. - return H5PIntegration.getContentPath(contentId); +H5P.getPath = function (path, contentId) { + if (path.substr(0, 7) === 'http://' || path.substr(0, 8) === 'https://') { + return path; + } + + return H5PIntegration.getContentPath(contentId) + path; }; //