aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.ts42
1 files changed, 36 insertions, 6 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index ca6c2a7ff..573d86b60 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -823,6 +823,7 @@ export {
823 823
824function buildVideoMimetypeExt () { 824function buildVideoMimetypeExt () {
825 const data = { 825 const data = {
826 // streamable formats that warrant cross-browser compatibility
826 'video/webm': '.webm', 827 'video/webm': '.webm',
827 'video/ogg': '.ogv', 828 'video/ogg': '.ogv',
828 'video/mp4': '.mp4' 829 'video/mp4': '.mp4'
@@ -831,15 +832,44 @@ function buildVideoMimetypeExt () {
831 if (CONFIG.TRANSCODING.ENABLED) { 832 if (CONFIG.TRANSCODING.ENABLED) {
832 if (CONFIG.TRANSCODING.ALLOW_ADDITIONAL_EXTENSIONS) { 833 if (CONFIG.TRANSCODING.ALLOW_ADDITIONAL_EXTENSIONS) {
833 Object.assign(data, { 834 Object.assign(data, {
834 'video/quicktime': '.mov',
835 'video/x-msvideo': '.avi',
836 'video/x-flv': '.flv',
837 'video/x-matroska': '.mkv', 835 'video/x-matroska': '.mkv',
838 'video/avi': '.avi', 836 'video/ogg': '.ogg',
837
838 // Developed by Apple
839 'video/quicktime': '.mov', // often used as output format by editing software
839 'video/x-m4v': '.m4v', 840 'video/x-m4v': '.m4v',
841 'video/m4v': '.m4v',
842
843 // Developed by the Adobe Flash Platform
844 'video/x-flv': '.flv',
845 'video/x-f4v': '.f4v', // replacement for flv
846
847 // Developed by Microsoft
848 'video/x-ms-wmv': '.wmv',
849 'video/x-msvideo': '.avi',
850 'video/avi': '.avi',
851
852 // Developed by 3GPP
853 // common video formats for cell phones
854 'video/3gpp': '.3gp',
855 'video/3gpp2': '.3g2',
856
857 // Developed by FFmpeg/Mplayer
858 'application/x-nut': '.nut',
859
860 // The standard video format used by many Sony and Panasonic HD camcorders.
861 // It is also used for storing high definition video on Blu-ray discs.
862 'video/mp2t': '.mts',
863 'video/m2ts': '.m2ts',
864
865 // Old formats reliant on MPEG-1/MPEG-2
866 'video/mpv': '.mpv',
867 'video/mpeg2': '.m2v',
868 'video/mpeg': '.mpeg',
869
840 // Could be anything 870 // Could be anything
841 'application/octet-stream': null, 871 'application/octet-stream': null,
842 'video/m4v': '.m4v' 872 'application/mxf': '.mxf' // often used as exchange format by editing software
843 }) 873 })
844 } 874 }
845 875
@@ -869,7 +899,7 @@ function updateWebserverConfig () {
869} 899}
870 900
871function buildVideosExtname () { 901function buildVideosExtname () {
872 return Object.keys(MIMETYPES.VIDEO.EXT_MIMETYPE) 902 return Object.keys(MIMETYPES.VIDEO.EXT_MIMETYPE).filter(e => e !== 'null')
873} 903}
874 904
875function loadLanguages () { 905function loadLanguages () {