1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/src/common/SupportedFormats.ts

40 lines
884 B
TypeScript
Raw Normal View History

2019-12-10 00:19:28 +08:00
export const SupportedFormats = {
Photos: [
'gif',
'jpeg', 'jpg', 'jpe',
'png',
'webp',
'svg'
],
Videos: [
'mp4',
'webm',
'ogv',
'ogg'
2019-12-10 00:19:28 +08:00
],
MetaFiles: [
'gpx'
],
TranscodeNeed: {
Photos: <string[]>[],
Videos: [
'avi',
'mkv',
'mov',
'wmv',
'flv'
],
},
2019-12-10 00:19:28 +08:00
WithDots: {
Photos: <string[]>[],
Videos: <string[]>[],
MetaFiles: <string[]>[],
}
};
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);