diff options
author | Georg Ehrke <developer@georgehrke.com> | 2013-07-24 14:46:47 +0400 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2013-07-24 14:47:32 +0400 |
commit | b0b456220ac0f6da54ad7bb4330e20f033af1204 (patch) | |
tree | 44cdfdf7a2c4f871db74b46412c1a5da5b7e3435 /files_videoviewer | |
parent | 7688948f4c89fbf26a0241a0cf3f21c04ecc07b9 (diff) |
make files_videoviewer more reusable
Diffstat (limited to 'files_videoviewer')
-rw-r--r-- | files_videoviewer/js/viewer.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/files_videoviewer/js/viewer.js b/files_videoviewer/js/viewer.js index 8af689008..efb54f887 100644 --- a/files_videoviewer/js/viewer.js +++ b/files_videoviewer/js/viewer.js @@ -40,6 +40,7 @@ var videoViewer = { file : null, location : null, player : null, + dir: null, mimeTypes : [ 'video/mp4', 'video/webm', @@ -53,6 +54,7 @@ var videoViewer = { ], onView : function(file) { videoViewer.file = file; + videoViewer.dir = $('#dir').val(); videoViewer.location = videoViewer.getMediaUrl(file); videoViewer.mime = FileActions.getCurrentMimeType(); @@ -87,8 +89,7 @@ var videoViewer = { videoViewer.UI.hide(); }, getMediaUrl : function(file) { - var dir = $('#dir').val(); - return fileDownloadPath(dir, file); + return fileDownloadPath(videoViewer.dir, file); }, onKeyDown : function(e) { if (e.keyCode == 27 && !$('.mejs-container-fullscreen').length && videoViewer.player) { |