diff --git a/videojs/src/font/vjs.eot b/js/videojs/font/vjs.eot similarity index 100% rename from videojs/src/font/vjs.eot rename to js/videojs/font/vjs.eot diff --git a/videojs/src/font/vjs.svg b/js/videojs/font/vjs.svg similarity index 100% rename from videojs/src/font/vjs.svg rename to js/videojs/font/vjs.svg diff --git a/videojs/src/font/vjs.ttf b/js/videojs/font/vjs.ttf similarity index 100% rename from videojs/src/font/vjs.ttf rename to js/videojs/font/vjs.ttf diff --git a/videojs/src/font/vjs.woff b/js/videojs/font/vjs.woff similarity index 100% rename from videojs/src/font/vjs.woff rename to js/videojs/font/vjs.woff diff --git a/videojs/src/lang/ar.js b/js/videojs/lang/ar.js similarity index 100% rename from videojs/src/lang/ar.js rename to js/videojs/lang/ar.js diff --git a/videojs/src/lang/bg.js b/js/videojs/lang/bg.js similarity index 100% rename from videojs/src/lang/bg.js rename to js/videojs/lang/bg.js diff --git a/videojs/src/lang/ca.js b/js/videojs/lang/ca.js similarity index 100% rename from videojs/src/lang/ca.js rename to js/videojs/lang/ca.js diff --git a/videojs/src/lang/cs.js b/js/videojs/lang/cs.js similarity index 100% rename from videojs/src/lang/cs.js rename to js/videojs/lang/cs.js diff --git a/videojs/src/lang/de.js b/js/videojs/lang/de.js similarity index 100% rename from videojs/src/lang/de.js rename to js/videojs/lang/de.js diff --git a/videojs/src/lang/es.js b/js/videojs/lang/es.js similarity index 100% rename from videojs/src/lang/es.js rename to js/videojs/lang/es.js diff --git a/videojs/src/lang/fr.js b/js/videojs/lang/fr.js similarity index 100% rename from videojs/src/lang/fr.js rename to js/videojs/lang/fr.js diff --git a/videojs/src/lang/hu.js b/js/videojs/lang/hu.js similarity index 100% rename from videojs/src/lang/hu.js rename to js/videojs/lang/hu.js diff --git a/videojs/src/lang/it.js b/js/videojs/lang/it.js similarity index 100% rename from videojs/src/lang/it.js rename to js/videojs/lang/it.js diff --git a/videojs/src/lang/ja.js b/js/videojs/lang/ja.js similarity index 100% rename from videojs/src/lang/ja.js rename to js/videojs/lang/ja.js diff --git a/videojs/src/lang/ko.js b/js/videojs/lang/ko.js similarity index 100% rename from videojs/src/lang/ko.js rename to js/videojs/lang/ko.js diff --git a/videojs/src/lang/nl.js b/js/videojs/lang/nl.js similarity index 100% rename from videojs/src/lang/nl.js rename to js/videojs/lang/nl.js diff --git a/videojs/src/lang/pt-BR.js b/js/videojs/lang/pt-BR.js similarity index 100% rename from videojs/src/lang/pt-BR.js rename to js/videojs/lang/pt-BR.js diff --git a/videojs/src/lang/ru.js b/js/videojs/lang/ru.js similarity index 100% rename from videojs/src/lang/ru.js rename to js/videojs/lang/ru.js diff --git a/videojs/src/lang/tr.js b/js/videojs/lang/tr.js similarity index 100% rename from videojs/src/lang/tr.js rename to js/videojs/lang/tr.js diff --git a/videojs/src/lang/uk.js b/js/videojs/lang/uk.js similarity index 100% rename from videojs/src/lang/uk.js rename to js/videojs/lang/uk.js diff --git a/videojs/src/lang/vi.js b/js/videojs/lang/vi.js similarity index 100% rename from videojs/src/lang/vi.js rename to js/videojs/lang/vi.js diff --git a/videojs/src/lang/zh-CN.js b/js/videojs/lang/zh-CN.js similarity index 100% rename from videojs/src/lang/zh-CN.js rename to js/videojs/lang/zh-CN.js diff --git a/videojs/src/lang/zh-TW.js b/js/videojs/lang/zh-TW.js similarity index 100% rename from videojs/src/lang/zh-TW.js rename to js/videojs/lang/zh-TW.js diff --git a/videojs/src/video-js.css b/js/videojs/video-js.css similarity index 100% rename from videojs/src/video-js.css rename to js/videojs/video-js.css diff --git a/videojs/src/video.js b/js/videojs/video.js similarity index 100% rename from videojs/src/video.js rename to js/videojs/video.js diff --git a/js/viewer.js b/js/viewer.js index 3c5c53b..d615ce3 100755 --- a/js/viewer.js +++ b/js/viewer.js @@ -5,10 +5,20 @@ 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($('')); - var scriptPath = OC.filePath('files_videoplayer', 'videojs', 'src/video.js'); - return $.getScript(scriptPath, function (xhr) {eval(xhr);}); + var scriptPath = OC.filePath('files_videoplayer', 'js', 'videojs/video.js'); + + var deferred = $.Deferred(); + 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; } }, videoJSLoaded: false,