@m4k/common 0.1.0 → 0.2.2
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/lib/index.d.ts +32 -4
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type QueuePosition = {
|
|
|
7
7
|
export type ProcessingError = {
|
|
8
8
|
error: string;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type ImageOptions = {
|
|
11
11
|
/** The rotation of the image. If not provided, the image will be auto-rotated, according to the EXIF data. To disable auto-rotation, set to `0`. */
|
|
12
12
|
rotate?: number;
|
|
13
13
|
/** Resizing options. */
|
|
@@ -47,7 +47,7 @@ export type ImageOptimizerOptions = {
|
|
|
47
47
|
/** The output path of the file. */
|
|
48
48
|
output?: string;
|
|
49
49
|
};
|
|
50
|
-
export type
|
|
50
|
+
export type VideoOptions = {
|
|
51
51
|
/** The aspect ratio of the output file. */
|
|
52
52
|
aspect?: number | string;
|
|
53
53
|
/** The bitrate of the audio. */
|
|
@@ -60,10 +60,14 @@ export type VideoOptimizerOptions = {
|
|
|
60
60
|
complexFilters?: string;
|
|
61
61
|
/** The duration of the output file. */
|
|
62
62
|
duration?: number | string;
|
|
63
|
-
/** The
|
|
63
|
+
/** The extension of the output file. */
|
|
64
|
+
ext?: string;
|
|
65
|
+
/** The format of the output file. If no extension is provided, it will be inferred from the format. */
|
|
64
66
|
format?: string;
|
|
65
67
|
/** The frames per second of the output file. */
|
|
66
68
|
fps?: number;
|
|
69
|
+
/** The frames to process. */
|
|
70
|
+
frames?: number;
|
|
67
71
|
/** The input format of the video. */
|
|
68
72
|
inputFormat?: string;
|
|
69
73
|
/** The padding of the output file. */
|
|
@@ -83,7 +87,31 @@ export type VideoOptimizerOptions = {
|
|
|
83
87
|
/** The output path of the file. */
|
|
84
88
|
output?: string;
|
|
85
89
|
};
|
|
86
|
-
export
|
|
90
|
+
export type AudioOptions = {
|
|
91
|
+
/** The bitrate of the audio. */
|
|
92
|
+
bitrate?: number | string;
|
|
93
|
+
/** The codec of the audio. */
|
|
94
|
+
codec?: string;
|
|
95
|
+
/** The complex filters to apply to the audio. */
|
|
96
|
+
complexFilters?: string;
|
|
97
|
+
/** The filters to apply to the audio. */
|
|
98
|
+
filters?: string;
|
|
99
|
+
/** The duration of the output file. */
|
|
100
|
+
duration?: number | string;
|
|
101
|
+
/** The extension of the output file. */
|
|
102
|
+
ext?: string;
|
|
103
|
+
/** The format of the output file. If no extension is provided, it will be inferred from the format. */
|
|
104
|
+
format?: string;
|
|
105
|
+
/** The input format of the audio. */
|
|
106
|
+
inputFormat?: string;
|
|
107
|
+
/** The seek time of the audio. */
|
|
108
|
+
seek?: number | string;
|
|
109
|
+
/** The name of the output file. */
|
|
110
|
+
name?: string;
|
|
111
|
+
/** The output path of the file. */
|
|
112
|
+
output?: string;
|
|
113
|
+
};
|
|
114
|
+
export declare class ProcessedFile {
|
|
87
115
|
readonly name: string;
|
|
88
116
|
readonly type: string;
|
|
89
117
|
readonly stream?: AsyncIterable<Uint8Array> | undefined;
|
package/lib/index.js
CHANGED