2019-12-10 00:19:28 +08:00
|
|
|
export const SupportedFormats = {
|
|
|
|
Photos: [
|
|
|
|
'gif',
|
|
|
|
'jpeg', 'jpg', 'jpe',
|
|
|
|
'png',
|
|
|
|
'webp',
|
|
|
|
'svg'
|
|
|
|
],
|
2019-12-11 17:39:39 +08:00
|
|
|
// Browser supported video formats
|
|
|
|
// Read more: https://www.w3schools.com/html/html5_video.asp
|
2019-12-10 00:19:28 +08:00
|
|
|
Videos: [
|
|
|
|
'mp4',
|
|
|
|
'webm',
|
|
|
|
'ogv',
|
2019-12-10 16:36:14 +08:00
|
|
|
'ogg'
|
2019-12-10 00:19:28 +08:00
|
|
|
],
|
|
|
|
MetaFiles: [
|
|
|
|
'gpx'
|
|
|
|
],
|
2019-12-11 17:39:39 +08:00
|
|
|
// These formats need to be transcoded (with the build-in ffmpeg support)
|
2019-12-10 16:36:14 +08:00
|
|
|
TranscodeNeed: {
|
|
|
|
Photos: <string[]>[],
|
|
|
|
Videos: [
|
|
|
|
'avi',
|
|
|
|
'mkv',
|
|
|
|
'mov',
|
|
|
|
'wmv',
|
2019-12-11 17:39:39 +08:00
|
|
|
'flv',
|
|
|
|
'.mts',
|
|
|
|
'.m2ts',
|
|
|
|
'mpg',
|
|
|
|
'3gp',
|
|
|
|
'm4v',
|
|
|
|
'mpeg',
|
|
|
|
'vob',
|
|
|
|
'divx',
|
|
|
|
'xvid',
|
|
|
|
'ts'
|
2019-12-10 16:36:14 +08:00
|
|
|
],
|
|
|
|
},
|
2019-12-10 00:19:28 +08:00
|
|
|
WithDots: {
|
|
|
|
Photos: <string[]>[],
|
|
|
|
Videos: <string[]>[],
|
|
|
|
MetaFiles: <string[]>[],
|
2019-12-10 19:50:02 +08:00
|
|
|
TranscodeNeed: {
|
|
|
|
Photos: <string[]>[],
|
|
|
|
Videos: <string[]>[],
|
|
|
|
}
|
2019-12-10 00:19:28 +08:00
|
|
|
}
|
|
|
|
};
|
2019-12-10 19:50:02 +08:00
|
|
|
|
2019-12-10 16:36:14 +08:00
|
|
|
SupportedFormats.Photos = SupportedFormats.Photos.concat(SupportedFormats.TranscodeNeed.Photos);
|
|
|
|
SupportedFormats.Videos = SupportedFormats.Videos.concat(SupportedFormats.TranscodeNeed.Videos);
|
2019-12-10 00:19:28 +08:00
|
|
|
SupportedFormats.WithDots.Photos = SupportedFormats.Photos.map(f => '.' + f);
|
|
|
|
SupportedFormats.WithDots.Videos = SupportedFormats.Videos.map(f => '.' + f);
|
|
|
|
SupportedFormats.WithDots.MetaFiles = SupportedFormats.MetaFiles.map(f => '.' + f);
|
2019-12-10 19:50:02 +08:00
|
|
|
SupportedFormats.WithDots.TranscodeNeed.Photos = SupportedFormats.TranscodeNeed.Photos.map(f => '.' + f);
|
|
|
|
SupportedFormats.WithDots.TranscodeNeed.Videos = SupportedFormats.TranscodeNeed.Videos.map(f => '.' + f);
|
2019-12-10 00:19:28 +08:00
|
|
|
|