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:
authorRobin Appelman <robin@icewind.nl>2016-12-09 16:26:20 +0300
committerGitHub <noreply@github.com>2016-12-09 16:26:20 +0300
commit30ed00f8f355d91835428e020b1cbfd51ad65fcf (patch)
tree84061f5901c0ee721ffa75300b7aaae65ad91566 /js/viewer.js
parentba078044178f40950f6a0e4adae369a7ea02dc15 (diff)
Revert "rich video previews in the sidebar"
Diffstat (limited to 'js/viewer.js')
-rwxr-xr-xjs/viewer.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/js/viewer.js b/js/viewer.js
index 5959603..c6ffeb1 100755
--- a/js/viewer.js
+++ b/js/viewer.js
@@ -117,50 +117,3 @@ $(document).ready(function(){
}
});
-
-(function () {
-
- var SidebarPreview = function () {
- };
-
- SidebarPreview.prototype = {
- attach: function (manager) {
- var handler = this.handlePreview.bind(this);
- $.each(videoViewer.mimeTypes, function (key, value) {
- if (value !== 'text') { // let the regular text preview handle this
- manager.addPreviewHandler(value, handler);
- }
- });
- },
-
- handlePreview: function (model, $thumbnailDiv, $thumbnailContainer, fallback) {
- var video = document.createElement('video');
- if (video.canPlayType(model.get('mimetype'))) {
- $thumbnailContainer.addClass('large');
- $thumbnailDiv.removeClass('icon-32');
- $thumbnailDiv.children('.stretcher').remove();
- video.src = OC.linkToRemoteBase('files' + model.getFullPath());
- video.autoplay = true;
- video.muted = true;
- video.loop = true;
- video.addEventListener('loadeddata', function () {
- $thumbnailDiv.removeClass('icon-loading');
- setTimeout(video.play.bind(video), 100);
- });
- $thumbnailDiv.append(video);
- video.load();
- video.onclick = function() {
- if (video.paused) {
- video.play();
- } else {
- video.pause();
- }
- };
- } else {
- fallback();
- }
- }
- };
-
- OC.Plugins.register('OCA.Files.SidebarPreviewManager', new SidebarPreview());
-})();