Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_videoplayer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-21 00:13:14 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-21 00:13:14 +0300
commit2f98c9a8db26fbe40e1b20dbf7383aae6777e0f4 (patch)
tree0202b3787fe4125d4c70be1714f8868b4d9f5bbb /js/viewer.js
parent9a29174846583aa823889cda7fe0fdeae198f4ee (diff)
Load the viewer
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'js/viewer.js')
-rwxr-xr-xjs/viewer.js13
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;
}
},