@storyteller-platform/audiobook 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -47
- package/dist/index.d.cts +2 -12
- package/dist/index.d.ts +2 -12
- package/dist/index.js +16 -34
- package/dist/mime.cjs +8 -1
- package/dist/mime.d.cts +13 -12
- package/dist/mime.d.ts +13 -12
- package/dist/mime.js +7 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -63,19 +63,17 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
63
63
|
};
|
|
64
64
|
var index_exports = {};
|
|
65
65
|
__export(index_exports, {
|
|
66
|
-
AAC_FILE_EXTENSIONS: () => AAC_FILE_EXTENSIONS,
|
|
67
|
-
AIFF_FILE_EXTENSIONS: () => AIFF_FILE_EXTENSIONS,
|
|
68
|
-
ALAC_FILE_EXTENSIONS: () => ALAC_FILE_EXTENSIONS,
|
|
66
|
+
AAC_FILE_EXTENSIONS: () => import_mime2.AAC_FILE_EXTENSIONS,
|
|
67
|
+
AIFF_FILE_EXTENSIONS: () => import_mime2.AIFF_FILE_EXTENSIONS,
|
|
69
68
|
Audiobook: () => Audiobook,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
getAttachedImageFromPath: () => getAttachedImageFromPath
|
|
69
|
+
MP3_FILE_EXTENSIONS: () => import_mime2.MP3_FILE_EXTENSIONS,
|
|
70
|
+
MPEG4_FILE_EXTENSIONS: () => import_mime2.MPEG4_FILE_EXTENSIONS,
|
|
71
|
+
OGG_FILE_EXTENSIONS: () => import_mime2.OGG_FILE_EXTENSIONS,
|
|
72
|
+
OPUS_FILE_EXTENSIONS: () => import_mime2.OPUS_FILE_EXTENSIONS,
|
|
73
|
+
getAttachedImageFromPath: () => getAttachedImageFromPath,
|
|
74
|
+
isAudioFile: () => import_mime2.isAudioFile,
|
|
75
|
+
isZipArchive: () => import_mime2.isZipArchive,
|
|
76
|
+
lookupAudioMime: () => import_mime2.lookupAudioMime
|
|
79
77
|
});
|
|
80
78
|
module.exports = __toCommonJS(index_exports);
|
|
81
79
|
var import_node_crypto = require("node:crypto");
|
|
@@ -88,34 +86,8 @@ var import_yauzl_promise = require("yauzl-promise");
|
|
|
88
86
|
var import_yazl = require("yazl");
|
|
89
87
|
var import_path = require("@storyteller-platform/path");
|
|
90
88
|
var import_entry = require("./entry.cjs");
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
".jpg",
|
|
94
|
-
".png",
|
|
95
|
-
".svg"
|
|
96
|
-
];
|
|
97
|
-
const MP3_FILE_EXTENSIONS = [".mp3"];
|
|
98
|
-
const MPEG4_FILE_EXTENSIONS = [".mp4", ".m4a", ".m4b"];
|
|
99
|
-
const AAC_FILE_EXTENSIONS = [".aac"];
|
|
100
|
-
const OGG_FILE_EXTENSIONS = [".ogg", ".oga", ".mogg"];
|
|
101
|
-
const OPUS_FILE_EXTENSIONS = [".opus"];
|
|
102
|
-
const WAVE_FILE_EXTENSIONS = [".wav"];
|
|
103
|
-
const AIFF_FILE_EXTENSIONS = [".aiff"];
|
|
104
|
-
const FLAC_FILE_EXTENSIONS = [".flac"];
|
|
105
|
-
const ALAC_FILE_EXTENSIONS = [".alac"];
|
|
106
|
-
const WEBM_FILE_EXTENSIONS = [".weba"];
|
|
107
|
-
const AUDIO_FILE_EXTENSIONS = [
|
|
108
|
-
...MP3_FILE_EXTENSIONS,
|
|
109
|
-
...AAC_FILE_EXTENSIONS,
|
|
110
|
-
...MPEG4_FILE_EXTENSIONS,
|
|
111
|
-
...OPUS_FILE_EXTENSIONS,
|
|
112
|
-
...OGG_FILE_EXTENSIONS,
|
|
113
|
-
...WAVE_FILE_EXTENSIONS,
|
|
114
|
-
...AIFF_FILE_EXTENSIONS,
|
|
115
|
-
...FLAC_FILE_EXTENSIONS,
|
|
116
|
-
...ALAC_FILE_EXTENSIONS,
|
|
117
|
-
...WEBM_FILE_EXTENSIONS
|
|
118
|
-
];
|
|
89
|
+
var import_mime = require("./mime.cjs");
|
|
90
|
+
var import_mime2 = require("./mime.cjs");
|
|
119
91
|
class Audiobook {
|
|
120
92
|
metadata = {};
|
|
121
93
|
inputs;
|
|
@@ -171,7 +143,7 @@ class Audiobook {
|
|
|
171
143
|
throw error;
|
|
172
144
|
}
|
|
173
145
|
return entries.filter(
|
|
174
|
-
(entry) => AUDIO_FILE_EXTENSIONS.includes(
|
|
146
|
+
(entry) => import_mime.AUDIO_FILE_EXTENSIONS.includes(
|
|
175
147
|
(0, import_path.extname)(entry)
|
|
176
148
|
)
|
|
177
149
|
).map((entry) => new import_entry.AudiobookEntry((0, import_path.join)(extractPath, entry)));
|
|
@@ -394,15 +366,13 @@ async function getAttachedImageFromPath(path, kind = "coverFront", description)
|
|
|
394
366
|
0 && (module.exports = {
|
|
395
367
|
AAC_FILE_EXTENSIONS,
|
|
396
368
|
AIFF_FILE_EXTENSIONS,
|
|
397
|
-
ALAC_FILE_EXTENSIONS,
|
|
398
369
|
Audiobook,
|
|
399
|
-
COVER_IMAGE_FILE_EXTENSIONS,
|
|
400
|
-
FLAC_FILE_EXTENSIONS,
|
|
401
370
|
MP3_FILE_EXTENSIONS,
|
|
402
371
|
MPEG4_FILE_EXTENSIONS,
|
|
403
372
|
OGG_FILE_EXTENSIONS,
|
|
404
373
|
OPUS_FILE_EXTENSIONS,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
374
|
+
getAttachedImageFromPath,
|
|
375
|
+
isAudioFile,
|
|
376
|
+
isZipArchive,
|
|
377
|
+
lookupAudioMime
|
|
408
378
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AudiobookEntry } from './entry.cjs';
|
|
2
2
|
import { AttachedPic } from './ffmpeg.cjs';
|
|
3
3
|
import { AudiobookChapter, AudiobookResource } from './resources.cjs';
|
|
4
|
+
export { AAC_FILE_EXTENSIONS, AIFF_FILE_EXTENSIONS, MP3_FILE_EXTENSIONS, MPEG4_FILE_EXTENSIONS, OGG_FILE_EXTENSIONS, OPUS_FILE_EXTENSIONS, isAudioFile, isZipArchive, lookupAudioMime } from './mime.cjs';
|
|
4
5
|
|
|
5
6
|
interface AudiobookMetadata {
|
|
6
7
|
title?: string | null;
|
|
@@ -14,17 +15,6 @@ interface AudiobookMetadata {
|
|
|
14
15
|
publisher?: string | null;
|
|
15
16
|
releaseDate?: Date | null;
|
|
16
17
|
}
|
|
17
|
-
declare const COVER_IMAGE_FILE_EXTENSIONS: readonly [".jpeg", ".jpg", ".png", ".svg"];
|
|
18
|
-
declare const MP3_FILE_EXTENSIONS: readonly [".mp3"];
|
|
19
|
-
declare const MPEG4_FILE_EXTENSIONS: readonly [".mp4", ".m4a", ".m4b"];
|
|
20
|
-
declare const AAC_FILE_EXTENSIONS: readonly [".aac"];
|
|
21
|
-
declare const OGG_FILE_EXTENSIONS: readonly [".ogg", ".oga", ".mogg"];
|
|
22
|
-
declare const OPUS_FILE_EXTENSIONS: readonly [".opus"];
|
|
23
|
-
declare const WAVE_FILE_EXTENSIONS: readonly [".wav"];
|
|
24
|
-
declare const AIFF_FILE_EXTENSIONS: readonly [".aiff"];
|
|
25
|
-
declare const FLAC_FILE_EXTENSIONS: readonly [".flac"];
|
|
26
|
-
declare const ALAC_FILE_EXTENSIONS: readonly [".alac"];
|
|
27
|
-
declare const WEBM_FILE_EXTENSIONS: readonly [".weba"];
|
|
28
18
|
type AudiobookInputs = [string, ...string[]];
|
|
29
19
|
declare class Audiobook {
|
|
30
20
|
protected metadata: AudiobookMetadata;
|
|
@@ -63,4 +53,4 @@ declare class Audiobook {
|
|
|
63
53
|
}
|
|
64
54
|
declare function getAttachedImageFromPath(path: string, kind?: AttachedPic["kind"], description?: string): Promise<AttachedPic>;
|
|
65
55
|
|
|
66
|
-
export {
|
|
56
|
+
export { Audiobook, AudiobookChapter, type AudiobookInputs, type AudiobookMetadata, getAttachedImageFromPath };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AudiobookEntry } from './entry.js';
|
|
2
2
|
import { AttachedPic } from './ffmpeg.js';
|
|
3
3
|
import { AudiobookChapter, AudiobookResource } from './resources.js';
|
|
4
|
+
export { AAC_FILE_EXTENSIONS, AIFF_FILE_EXTENSIONS, MP3_FILE_EXTENSIONS, MPEG4_FILE_EXTENSIONS, OGG_FILE_EXTENSIONS, OPUS_FILE_EXTENSIONS, isAudioFile, isZipArchive, lookupAudioMime } from './mime.js';
|
|
4
5
|
|
|
5
6
|
interface AudiobookMetadata {
|
|
6
7
|
title?: string | null;
|
|
@@ -14,17 +15,6 @@ interface AudiobookMetadata {
|
|
|
14
15
|
publisher?: string | null;
|
|
15
16
|
releaseDate?: Date | null;
|
|
16
17
|
}
|
|
17
|
-
declare const COVER_IMAGE_FILE_EXTENSIONS: readonly [".jpeg", ".jpg", ".png", ".svg"];
|
|
18
|
-
declare const MP3_FILE_EXTENSIONS: readonly [".mp3"];
|
|
19
|
-
declare const MPEG4_FILE_EXTENSIONS: readonly [".mp4", ".m4a", ".m4b"];
|
|
20
|
-
declare const AAC_FILE_EXTENSIONS: readonly [".aac"];
|
|
21
|
-
declare const OGG_FILE_EXTENSIONS: readonly [".ogg", ".oga", ".mogg"];
|
|
22
|
-
declare const OPUS_FILE_EXTENSIONS: readonly [".opus"];
|
|
23
|
-
declare const WAVE_FILE_EXTENSIONS: readonly [".wav"];
|
|
24
|
-
declare const AIFF_FILE_EXTENSIONS: readonly [".aiff"];
|
|
25
|
-
declare const FLAC_FILE_EXTENSIONS: readonly [".flac"];
|
|
26
|
-
declare const ALAC_FILE_EXTENSIONS: readonly [".alac"];
|
|
27
|
-
declare const WEBM_FILE_EXTENSIONS: readonly [".weba"];
|
|
28
18
|
type AudiobookInputs = [string, ...string[]];
|
|
29
19
|
declare class Audiobook {
|
|
30
20
|
protected metadata: AudiobookMetadata;
|
|
@@ -63,4 +53,4 @@ declare class Audiobook {
|
|
|
63
53
|
}
|
|
64
54
|
declare function getAttachedImageFromPath(path: string, kind?: AttachedPic["kind"], description?: string): Promise<AttachedPic>;
|
|
65
55
|
|
|
66
|
-
export {
|
|
56
|
+
export { Audiobook, AudiobookChapter, type AudiobookInputs, type AudiobookMetadata, getAttachedImageFromPath };
|
package/dist/index.js
CHANGED
|
@@ -12,34 +12,18 @@ import { open } from "yauzl-promise";
|
|
|
12
12
|
import { ZipFile } from "yazl";
|
|
13
13
|
import { basename, dirname, extname, join } from "@storyteller-platform/path";
|
|
14
14
|
import { AudiobookEntry } from "./entry.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const AIFF_FILE_EXTENSIONS = [".aiff"];
|
|
28
|
-
const FLAC_FILE_EXTENSIONS = [".flac"];
|
|
29
|
-
const ALAC_FILE_EXTENSIONS = [".alac"];
|
|
30
|
-
const WEBM_FILE_EXTENSIONS = [".weba"];
|
|
31
|
-
const AUDIO_FILE_EXTENSIONS = [
|
|
32
|
-
...MP3_FILE_EXTENSIONS,
|
|
33
|
-
...AAC_FILE_EXTENSIONS,
|
|
34
|
-
...MPEG4_FILE_EXTENSIONS,
|
|
35
|
-
...OPUS_FILE_EXTENSIONS,
|
|
36
|
-
...OGG_FILE_EXTENSIONS,
|
|
37
|
-
...WAVE_FILE_EXTENSIONS,
|
|
38
|
-
...AIFF_FILE_EXTENSIONS,
|
|
39
|
-
...FLAC_FILE_EXTENSIONS,
|
|
40
|
-
...ALAC_FILE_EXTENSIONS,
|
|
41
|
-
...WEBM_FILE_EXTENSIONS
|
|
42
|
-
];
|
|
15
|
+
import { AUDIO_FILE_EXTENSIONS } from "./mime.js";
|
|
16
|
+
import {
|
|
17
|
+
AAC_FILE_EXTENSIONS,
|
|
18
|
+
AIFF_FILE_EXTENSIONS,
|
|
19
|
+
MP3_FILE_EXTENSIONS,
|
|
20
|
+
MPEG4_FILE_EXTENSIONS,
|
|
21
|
+
OGG_FILE_EXTENSIONS,
|
|
22
|
+
OPUS_FILE_EXTENSIONS,
|
|
23
|
+
isAudioFile,
|
|
24
|
+
isZipArchive,
|
|
25
|
+
lookupAudioMime
|
|
26
|
+
} from "./mime.js";
|
|
43
27
|
class Audiobook {
|
|
44
28
|
metadata = {};
|
|
45
29
|
inputs;
|
|
@@ -317,15 +301,13 @@ async function getAttachedImageFromPath(path, kind = "coverFront", description)
|
|
|
317
301
|
export {
|
|
318
302
|
AAC_FILE_EXTENSIONS,
|
|
319
303
|
AIFF_FILE_EXTENSIONS,
|
|
320
|
-
ALAC_FILE_EXTENSIONS,
|
|
321
304
|
Audiobook,
|
|
322
|
-
COVER_IMAGE_FILE_EXTENSIONS,
|
|
323
|
-
FLAC_FILE_EXTENSIONS,
|
|
324
305
|
MP3_FILE_EXTENSIONS,
|
|
325
306
|
MPEG4_FILE_EXTENSIONS,
|
|
326
307
|
OGG_FILE_EXTENSIONS,
|
|
327
308
|
OPUS_FILE_EXTENSIONS,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
309
|
+
getAttachedImageFromPath,
|
|
310
|
+
isAudioFile,
|
|
311
|
+
isZipArchive,
|
|
312
|
+
lookupAudioMime
|
|
331
313
|
};
|
package/dist/mime.cjs
CHANGED
|
@@ -21,6 +21,7 @@ __export(mime_exports, {
|
|
|
21
21
|
AAC_FILE_EXTENSIONS: () => AAC_FILE_EXTENSIONS,
|
|
22
22
|
AIFF_FILE_EXTENSIONS: () => AIFF_FILE_EXTENSIONS,
|
|
23
23
|
ALAC_FILE_EXTENSIONS: () => ALAC_FILE_EXTENSIONS,
|
|
24
|
+
AUDIO_FILE_EXTENSIONS: () => AUDIO_FILE_EXTENSIONS,
|
|
24
25
|
COVER_IMAGE_FILE_EXTENSIONS: () => COVER_IMAGE_FILE_EXTENSIONS,
|
|
25
26
|
FLAC_FILE_EXTENSIONS: () => FLAC_FILE_EXTENSIONS,
|
|
26
27
|
MP3_FILE_EXTENSIONS: () => MP3_FILE_EXTENSIONS,
|
|
@@ -34,7 +35,12 @@ __export(mime_exports, {
|
|
|
34
35
|
lookupAudioMime: () => lookupAudioMime
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(mime_exports);
|
|
37
|
-
const COVER_IMAGE_FILE_EXTENSIONS = [
|
|
38
|
+
const COVER_IMAGE_FILE_EXTENSIONS = [
|
|
39
|
+
".jpeg",
|
|
40
|
+
".jpg",
|
|
41
|
+
".png",
|
|
42
|
+
".svg"
|
|
43
|
+
];
|
|
38
44
|
const MP3_FILE_EXTENSIONS = [".mp3"];
|
|
39
45
|
const MPEG4_FILE_EXTENSIONS = [".mp4", ".m4a", ".m4b"];
|
|
40
46
|
const AAC_FILE_EXTENSIONS = [".aac"];
|
|
@@ -98,6 +104,7 @@ function lookupAudioMime(filenameOrExt) {
|
|
|
98
104
|
AAC_FILE_EXTENSIONS,
|
|
99
105
|
AIFF_FILE_EXTENSIONS,
|
|
100
106
|
ALAC_FILE_EXTENSIONS,
|
|
107
|
+
AUDIO_FILE_EXTENSIONS,
|
|
101
108
|
COVER_IMAGE_FILE_EXTENSIONS,
|
|
102
109
|
FLAC_FILE_EXTENSIONS,
|
|
103
110
|
MP3_FILE_EXTENSIONS,
|
package/dist/mime.d.cts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
declare const COVER_IMAGE_FILE_EXTENSIONS:
|
|
2
|
-
declare const MP3_FILE_EXTENSIONS:
|
|
3
|
-
declare const MPEG4_FILE_EXTENSIONS:
|
|
4
|
-
declare const AAC_FILE_EXTENSIONS:
|
|
5
|
-
declare const OGG_FILE_EXTENSIONS:
|
|
6
|
-
declare const OPUS_FILE_EXTENSIONS:
|
|
7
|
-
declare const WAVE_FILE_EXTENSIONS:
|
|
8
|
-
declare const AIFF_FILE_EXTENSIONS:
|
|
9
|
-
declare const FLAC_FILE_EXTENSIONS:
|
|
10
|
-
declare const ALAC_FILE_EXTENSIONS:
|
|
11
|
-
declare const WEBM_FILE_EXTENSIONS:
|
|
1
|
+
declare const COVER_IMAGE_FILE_EXTENSIONS: readonly [".jpeg", ".jpg", ".png", ".svg"];
|
|
2
|
+
declare const MP3_FILE_EXTENSIONS: readonly [".mp3"];
|
|
3
|
+
declare const MPEG4_FILE_EXTENSIONS: readonly [".mp4", ".m4a", ".m4b"];
|
|
4
|
+
declare const AAC_FILE_EXTENSIONS: readonly [".aac"];
|
|
5
|
+
declare const OGG_FILE_EXTENSIONS: readonly [".ogg", ".oga", ".mogg"];
|
|
6
|
+
declare const OPUS_FILE_EXTENSIONS: readonly [".opus"];
|
|
7
|
+
declare const WAVE_FILE_EXTENSIONS: readonly [".wav"];
|
|
8
|
+
declare const AIFF_FILE_EXTENSIONS: readonly [".aiff"];
|
|
9
|
+
declare const FLAC_FILE_EXTENSIONS: readonly [".flac"];
|
|
10
|
+
declare const ALAC_FILE_EXTENSIONS: readonly [".alac"];
|
|
11
|
+
declare const WEBM_FILE_EXTENSIONS: readonly [".weba"];
|
|
12
|
+
declare const AUDIO_FILE_EXTENSIONS: readonly [".mp3", ".aac", ".mp4", ".m4a", ".m4b", ".opus", ".ogg", ".oga", ".mogg", ".wav", ".aiff", ".flac", ".alac", ".weba"];
|
|
12
13
|
/**
|
|
13
14
|
* Determines if a file with the given name or extension might contain audio.
|
|
14
15
|
*
|
|
@@ -37,4 +38,4 @@ declare function isZipArchive(filenameOrExt: string): boolean;
|
|
|
37
38
|
*/
|
|
38
39
|
declare function lookupAudioMime(filenameOrExt: string): string | null;
|
|
39
40
|
|
|
40
|
-
export { AAC_FILE_EXTENSIONS, AIFF_FILE_EXTENSIONS, ALAC_FILE_EXTENSIONS, COVER_IMAGE_FILE_EXTENSIONS, FLAC_FILE_EXTENSIONS, MP3_FILE_EXTENSIONS, MPEG4_FILE_EXTENSIONS, OGG_FILE_EXTENSIONS, OPUS_FILE_EXTENSIONS, WAVE_FILE_EXTENSIONS, WEBM_FILE_EXTENSIONS, isAudioFile, isZipArchive, lookupAudioMime };
|
|
41
|
+
export { AAC_FILE_EXTENSIONS, AIFF_FILE_EXTENSIONS, ALAC_FILE_EXTENSIONS, AUDIO_FILE_EXTENSIONS, COVER_IMAGE_FILE_EXTENSIONS, FLAC_FILE_EXTENSIONS, MP3_FILE_EXTENSIONS, MPEG4_FILE_EXTENSIONS, OGG_FILE_EXTENSIONS, OPUS_FILE_EXTENSIONS, WAVE_FILE_EXTENSIONS, WEBM_FILE_EXTENSIONS, isAudioFile, isZipArchive, lookupAudioMime };
|
package/dist/mime.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
declare const COVER_IMAGE_FILE_EXTENSIONS:
|
|
2
|
-
declare const MP3_FILE_EXTENSIONS:
|
|
3
|
-
declare const MPEG4_FILE_EXTENSIONS:
|
|
4
|
-
declare const AAC_FILE_EXTENSIONS:
|
|
5
|
-
declare const OGG_FILE_EXTENSIONS:
|
|
6
|
-
declare const OPUS_FILE_EXTENSIONS:
|
|
7
|
-
declare const WAVE_FILE_EXTENSIONS:
|
|
8
|
-
declare const AIFF_FILE_EXTENSIONS:
|
|
9
|
-
declare const FLAC_FILE_EXTENSIONS:
|
|
10
|
-
declare const ALAC_FILE_EXTENSIONS:
|
|
11
|
-
declare const WEBM_FILE_EXTENSIONS:
|
|
1
|
+
declare const COVER_IMAGE_FILE_EXTENSIONS: readonly [".jpeg", ".jpg", ".png", ".svg"];
|
|
2
|
+
declare const MP3_FILE_EXTENSIONS: readonly [".mp3"];
|
|
3
|
+
declare const MPEG4_FILE_EXTENSIONS: readonly [".mp4", ".m4a", ".m4b"];
|
|
4
|
+
declare const AAC_FILE_EXTENSIONS: readonly [".aac"];
|
|
5
|
+
declare const OGG_FILE_EXTENSIONS: readonly [".ogg", ".oga", ".mogg"];
|
|
6
|
+
declare const OPUS_FILE_EXTENSIONS: readonly [".opus"];
|
|
7
|
+
declare const WAVE_FILE_EXTENSIONS: readonly [".wav"];
|
|
8
|
+
declare const AIFF_FILE_EXTENSIONS: readonly [".aiff"];
|
|
9
|
+
declare const FLAC_FILE_EXTENSIONS: readonly [".flac"];
|
|
10
|
+
declare const ALAC_FILE_EXTENSIONS: readonly [".alac"];
|
|
11
|
+
declare const WEBM_FILE_EXTENSIONS: readonly [".weba"];
|
|
12
|
+
declare const AUDIO_FILE_EXTENSIONS: readonly [".mp3", ".aac", ".mp4", ".m4a", ".m4b", ".opus", ".ogg", ".oga", ".mogg", ".wav", ".aiff", ".flac", ".alac", ".weba"];
|
|
12
13
|
/**
|
|
13
14
|
* Determines if a file with the given name or extension might contain audio.
|
|
14
15
|
*
|
|
@@ -37,4 +38,4 @@ declare function isZipArchive(filenameOrExt: string): boolean;
|
|
|
37
38
|
*/
|
|
38
39
|
declare function lookupAudioMime(filenameOrExt: string): string | null;
|
|
39
40
|
|
|
40
|
-
export { AAC_FILE_EXTENSIONS, AIFF_FILE_EXTENSIONS, ALAC_FILE_EXTENSIONS, COVER_IMAGE_FILE_EXTENSIONS, FLAC_FILE_EXTENSIONS, MP3_FILE_EXTENSIONS, MPEG4_FILE_EXTENSIONS, OGG_FILE_EXTENSIONS, OPUS_FILE_EXTENSIONS, WAVE_FILE_EXTENSIONS, WEBM_FILE_EXTENSIONS, isAudioFile, isZipArchive, lookupAudioMime };
|
|
41
|
+
export { AAC_FILE_EXTENSIONS, AIFF_FILE_EXTENSIONS, ALAC_FILE_EXTENSIONS, AUDIO_FILE_EXTENSIONS, COVER_IMAGE_FILE_EXTENSIONS, FLAC_FILE_EXTENSIONS, MP3_FILE_EXTENSIONS, MPEG4_FILE_EXTENSIONS, OGG_FILE_EXTENSIONS, OPUS_FILE_EXTENSIONS, WAVE_FILE_EXTENSIONS, WEBM_FILE_EXTENSIONS, isAudioFile, isZipArchive, lookupAudioMime };
|
package/dist/mime.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import "./chunk-BIEQXUOY.js";
|
|
2
|
-
const COVER_IMAGE_FILE_EXTENSIONS = [
|
|
2
|
+
const COVER_IMAGE_FILE_EXTENSIONS = [
|
|
3
|
+
".jpeg",
|
|
4
|
+
".jpg",
|
|
5
|
+
".png",
|
|
6
|
+
".svg"
|
|
7
|
+
];
|
|
3
8
|
const MP3_FILE_EXTENSIONS = [".mp3"];
|
|
4
9
|
const MPEG4_FILE_EXTENSIONS = [".mp4", ".m4a", ".m4b"];
|
|
5
10
|
const AAC_FILE_EXTENSIONS = [".aac"];
|
|
@@ -62,6 +67,7 @@ export {
|
|
|
62
67
|
AAC_FILE_EXTENSIONS,
|
|
63
68
|
AIFF_FILE_EXTENSIONS,
|
|
64
69
|
ALAC_FILE_EXTENSIONS,
|
|
70
|
+
AUDIO_FILE_EXTENSIONS,
|
|
65
71
|
COVER_IMAGE_FILE_EXTENSIONS,
|
|
66
72
|
FLAC_FILE_EXTENSIONS,
|
|
67
73
|
MP3_FILE_EXTENSIONS,
|