diff options
-rwxr-xr-x | js/viewer.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/js/viewer.js b/js/viewer.js index d1d896f..d615ce3 100755 --- a/js/viewer.js +++ b/js/viewer.js @@ -5,14 +5,19 @@ var videoViewer = { return $.when(); } else { this.videoJSLoaded = true; - var stylePath = OC.filePath('files_videoplayer', 'videojs', 'src/video-js.css'); + var stylePath = OC.filePath('files_videoplayer', 'js', 'videojs/video-js.css'); $('head').append($('<link rel="stylesheet" type="text/css" href="' + stylePath + '"/>')); - var scriptPath = OC.filePath('files_videoplayer', 'videojs', 'src/video.js'); + var scriptPath = OC.filePath('files_videoplayer', 'js', 'videojs/video.js'); var deferred = $.Deferred(); - $.getScript(scriptPath, function() { + var script = document.createElement('script'); + script.src = scriptPath; + script.setAttribute('nonce', btoa(OC.requestToken)); + script.onload = function() { deferred.resolve(); - }); + }; + document.head.appendChild(script); + return deferred; } }, |