-
Notifications
You must be signed in to change notification settings - Fork 210
/
Copy pathSupportedFormats.ts
59 lines (57 loc) · 1.46 KB
/
SupportedFormats.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export const SupportedFormats = {
Photos: [
'gif',
'jpeg', 'jpg', 'jpe',
'png',
'webp',
'svg'
],
// Browser supported video formats
// Read more: https://www.w3schools.com/html/html5_video.asp
Videos: [
'mp4',
'webm',
'ogv',
'ogg'
],
MetaFiles: [
'gpx'
],
// These formats need to be transcoded (with the build-in ffmpeg support)
TranscodeNeed: {
Photos: <string[]>[],
Videos: [
'avi',
'mkv',
'mov',
'wmv',
'flv',
'mts',
'm2ts',
'mpg',
'3gp',
'm4v',
'mpeg',
'vob',
'divx',
'xvid',
'ts'
],
},
WithDots: {
Photos: <string[]>[],
Videos: <string[]>[],
MetaFiles: <string[]>[],
TranscodeNeed: {
Photos: <string[]>[],
Videos: <string[]>[],
}
}
};
SupportedFormats.Photos = SupportedFormats.Photos.concat(SupportedFormats.TranscodeNeed.Photos);
SupportedFormats.Videos = SupportedFormats.Videos.concat(SupportedFormats.TranscodeNeed.Videos);
SupportedFormats.WithDots.Photos = SupportedFormats.Photos.map(f => '.' + f);
SupportedFormats.WithDots.Videos = SupportedFormats.Videos.map(f => '.' + f);
SupportedFormats.WithDots.MetaFiles = SupportedFormats.MetaFiles.map(f => '.' + f);
SupportedFormats.WithDots.TranscodeNeed.Photos = SupportedFormats.TranscodeNeed.Photos.map(f => '.' + f);
SupportedFormats.WithDots.TranscodeNeed.Videos = SupportedFormats.TranscodeNeed.Videos.map(f => '.' + f);