diff --git a/seahub/templates/snippets/file_content_js.html b/seahub/templates/snippets/file_content_js.html index 6ef653ebc3..32868d91ce 100644 --- a/seahub/templates/snippets/file_content_js.html +++ b/seahub/templates/snippets/file_content_js.html @@ -139,8 +139,13 @@ try { {% endif %} {% if filetype == 'Video' %} - $('#file-view').html('
'); -$('video').mediaelementplayer(/* Options */); +$('#file-view').html(''); +videojs.options.flash.swf = "{{MEDIA_URL}}js/video-js.swf"; +videojs('sf-video', { + 'controls': true, + 'autoplay': false, + 'preload': 'auto' +}); {% endif %} {% if filetype == 'Audio' %} diff --git a/seahub/templates/snippets/file_view_js.html b/seahub/templates/snippets/file_view_js.html index 8ddf9af814..407904a538 100644 --- a/seahub/templates/snippets/file_view_js.html +++ b/seahub/templates/snippets/file_view_js.html @@ -4,9 +4,12 @@ {% if filetype == 'PDF' and use_pdfjs %} {% endif %} -{% if filetype == 'Video' or filetype == 'Audio' %} +{% if filetype == 'Audio' %} {% endif %} +{% if filetype == 'Video' %} + +{% endif %} {% if filetype == 'Markdown' %} {% endif %} diff --git a/seahub/templates/snippets/file_view_style.html b/seahub/templates/snippets/file_view_style.html index 26be08f8b4..4da983e60e 100644 --- a/seahub/templates/snippets/file_view_style.html +++ b/seahub/templates/snippets/file_view_style.html @@ -14,10 +14,14 @@ {% endif %} -{% if filetype == 'Video' or filetype == 'Audio' %} +{% if filetype == 'Audio' %} {% endif %} +{% if filetype == 'Video' %} + +{% endif %} + {% if filetype == 'Document' or filetype == 'PDF' and not use_pdfjs %} {% include 'snippets/office_convert_style.html' %} {% endif %} diff --git a/seahub/utils/__init__.py b/seahub/utils/__init__.py index a749f338ff..b68ad9fad1 100644 --- a/seahub/utils/__init__.py +++ b/seahub/utils/__init__.py @@ -102,7 +102,7 @@ PREVIEW_FILEEXT = { PDF: ('pdf',), OPENDOCUMENT: ('odt', 'fodt', 'odp', 'fodp'), MARKDOWN: ('markdown', 'md'), - VIDEO: ('mp4', 'ogv', 'webm', 'wmv', 'mov'), + VIDEO: ('mp4', 'ogv', 'webm', 'mov'), AUDIO: ('mp3', 'oga', 'ogg'), '3D': ('stl', 'obj'), }