Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from nextcloud/use_videojs
Browse files Browse the repository at this point in the history
Fix videoplayback on NC15
  • Loading branch information
juliusknorr authored Nov 21, 2018
2 parents 8fe2593 + 5a3b5b1 commit 7b2f239
Show file tree
Hide file tree
Showing 26 changed files with 13 additions and 3 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 13 additions & 3 deletions js/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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($('<link rel="stylesheet" type="text/css" href="' + stylePath + '"/>'));
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,
Expand Down

0 comments on commit 7b2f239

Please sign in to comment.