diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-10-08 23:43:37 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-10-08 23:43:37 +0300 |
commit | fee9c82842846e287f56dd0db8acd4efa2a29d7d (patch) | |
tree | d6e68818a0e2e621ca5a6a1938109c4831945520 /files_videoviewer | |
parent | 1fea87c4998fb65f624b1ebb58f10cb5bde6113f (diff) |
Allow seeking for non-public videos. Ref #2087
Diffstat (limited to 'files_videoviewer')
-rw-r--r-- | files_videoviewer/js/viewer.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/files_videoviewer/js/viewer.js b/files_videoviewer/js/viewer.js index e62f2415d..75634b994 100644 --- a/files_videoviewer/js/viewer.js +++ b/files_videoviewer/js/viewer.js @@ -54,7 +54,12 @@ var videoViewer = { onView : function(file, data) { videoViewer.file = file; videoViewer.dir = data.dir; - videoViewer.location = data.fileList.getDownloadUrl(file, videoViewer.dir); + if ($('#isPublic').length){ + // No seek for public videos atm, sorry + videoViewer.location = data.fileList.getDownloadUrl(file, videoViewer.dir); + } else { + videoViewer.location = OC.linkToRemote('webdav') + OC.joinPaths(videoViewer.dir, file); + } videoViewer.mime = data.$file.attr('data-mime'); OC.addScript('files_videoviewer','mediaelement-and-player', function(){ |