@soga/entities 0.0.2 → 0.0.4
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/main.d.ts +0 -1
- package/dist/main.js +1 -1
- package/dist/upload-chunk.d.ts +23 -0
- package/dist/upload-chunk.js +1 -0
- package/dist/upload-file.d.ts +6 -337
- package/dist/upload-file.js +1 -1
- package/package.json +47 -47
- package/dist/data-cache.d.ts +0 -15
- package/dist/data-cache.js +0 -1
- package/dist/mediainfo.types.d.ts +0 -248
- package/dist/mediainfo.types.js +0 -1
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./dlink"),exports),__exportStar(require("./download-chunk"),exports),__exportStar(require("./download-file"),exports),__exportStar(require("./host-token"),exports),__exportStar(require("./net-success"),exports),__exportStar(require("./system"),exports),__exportStar(require("./upload-file"),exports),__exportStar(require("./upload-success"),exports),__exportStar(require("./user"),exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HostType } from '@soga/types';
|
|
2
|
+
declare enum ChunkStep {
|
|
3
|
+
NULL = 0,
|
|
4
|
+
UPLOADING = 1,
|
|
5
|
+
SUCCESS = 2,
|
|
6
|
+
FAILED = 3
|
|
7
|
+
}
|
|
8
|
+
export declare class UploadChunk {
|
|
9
|
+
id: number;
|
|
10
|
+
type: HostType;
|
|
11
|
+
step: ChunkStep;
|
|
12
|
+
group: string;
|
|
13
|
+
uid: number;
|
|
14
|
+
path: string;
|
|
15
|
+
start: number;
|
|
16
|
+
end: number;
|
|
17
|
+
md5: string;
|
|
18
|
+
params: object;
|
|
19
|
+
expired_at: number;
|
|
20
|
+
updated_at: Date;
|
|
21
|
+
created_at: Date;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var p,d=arguments.length,r=d<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var _=e.length-1;_>=0;_--)(p=e[_])&&(r=(d<3?p(r):d>3?p(t,o,r):p(t,o))||r);return d>3&&r&&Object.defineProperty(t,o,r),r},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UploadChunk=void 0;const types_1=require("@soga/types"),typeorm_1=require("typeorm");var ChunkStep;!function(e){e[e.NULL=0]="NULL",e[e.UPLOADING=1]="UPLOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED"}(ChunkStep||(ChunkStep={}));let UploadChunk=class{id;type;step;group;uid;path;start;end;md5;params;expired_at;updated_at;created_at};exports.UploadChunk=UploadChunk,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],UploadChunk.prototype,"id",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.HostType}),__metadata("design:type",String)],UploadChunk.prototype,"type",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:ChunkStep,default:ChunkStep.NULL}),__metadata("design:type",Number)],UploadChunk.prototype,"step",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadChunk.prototype,"group",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadChunk.prototype,"uid",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadChunk.prototype,"path",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadChunk.prototype,"start",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadChunk.prototype,"end",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadChunk.prototype,"md5",void 0),__decorate([(0,typeorm_1.Column)("json",{default:"{}"}),__metadata("design:type",Object)],UploadChunk.prototype,"params",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadChunk.prototype,"expired_at",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],UploadChunk.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],UploadChunk.prototype,"created_at",void 0),exports.UploadChunk=UploadChunk=__decorate([(0,typeorm_1.Entity)()],UploadChunk);
|
package/dist/upload-file.d.ts
CHANGED
|
@@ -1,48 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type CommonManifest = {
|
|
3
|
-
version: number;
|
|
4
|
-
targetDuration: number;
|
|
5
|
-
mediaSequence: number;
|
|
6
|
-
endList: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type SegmentInfo = {
|
|
9
|
-
index: number;
|
|
10
|
-
duration: number;
|
|
11
|
-
init_uri: string;
|
|
12
|
-
uri: string;
|
|
13
|
-
file_path: string;
|
|
14
|
-
folder: string;
|
|
15
|
-
size: number;
|
|
16
|
-
start_time: number;
|
|
17
|
-
end_time: number;
|
|
18
|
-
};
|
|
19
|
-
export type M3U8Manifest = CommonManifest & {
|
|
20
|
-
init: {
|
|
21
|
-
uri: string;
|
|
22
|
-
file_path: string;
|
|
23
|
-
size: number;
|
|
24
|
-
};
|
|
25
|
-
segments: SegmentInfo[];
|
|
26
|
-
};
|
|
27
|
-
import { HostType, RecordType, RecordFolderConfig, ManifestVideoMetaInfo, ManifestAudioMetaInfo, ManifestTextItem, SubtitleType, RecordFtype, EncodeStatus, UploadStatus, RootStatus } from '@soga/types';
|
|
28
|
-
export type UploadProgressStep = 'PREPARE' | 'SEPARATE_VIDEO_TRACK' | 'SEPARATE_AUDIO_TRACK' | 'SEPARATE_TEXT_TRACK' | 'ENCODE_VIDEO_TRACK' | 'ENCODE_AUDIO_TRACK' | 'ENCODE_THUMBNAIL' | 'ENCODE_SOURCE' | 'ENCODE_TXT' | 'UPLOAD_BAIDU' | 'UPLOAD_ALI' | 'ENDING';
|
|
1
|
+
import { HostType, RecordType, RecordFolderConfig, RecordFtype, EncodeStatus, UploadStatus, RootStatus, UploadPrepareData, TxtGroupData, SourceGroupData, MediaGroupData } from '@soga/types';
|
|
29
2
|
export declare class UploadFile {
|
|
30
3
|
id: number;
|
|
31
4
|
root_id: number;
|
|
32
5
|
root_status: RootStatus;
|
|
33
|
-
space_id: number;
|
|
34
|
-
space_name: string;
|
|
35
6
|
is_folder: boolean;
|
|
36
7
|
task_id: number;
|
|
37
|
-
is_affix: boolean;
|
|
38
8
|
is_paused: boolean;
|
|
39
9
|
config: RecordFolderConfig;
|
|
40
10
|
can_stop: boolean;
|
|
41
|
-
stop_checker: {
|
|
42
|
-
can_stop: boolean;
|
|
43
|
-
code: number;
|
|
44
|
-
message: string;
|
|
45
|
-
};
|
|
46
11
|
uid: number;
|
|
47
12
|
aid: number;
|
|
48
13
|
file_total: number;
|
|
@@ -56,33 +21,16 @@ export declare class UploadFile {
|
|
|
56
21
|
ftype: RecordFtype;
|
|
57
22
|
path: string;
|
|
58
23
|
filename: string;
|
|
59
|
-
title: string;
|
|
60
24
|
size: number;
|
|
61
|
-
local_birthtime: number;
|
|
62
|
-
local_ctime: number;
|
|
63
|
-
local_mtime: number;
|
|
64
25
|
task_record_id: number;
|
|
65
26
|
record_folder_info: RecordFolderInfo;
|
|
66
27
|
output_root: string;
|
|
67
|
-
external_texts:
|
|
68
|
-
progress:
|
|
28
|
+
external_texts: string[];
|
|
29
|
+
progress: UploadPrepareData;
|
|
69
30
|
percent: number;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
default_videos?: VideoTrackInfo[];
|
|
74
|
-
default_audios?: AudioTrackInfo[];
|
|
75
|
-
default_texts?: TextTrackInfo[];
|
|
76
|
-
video_default?: PrepareVideoTrackInfo;
|
|
77
|
-
video_adapts?: PrepareVideoTrackInfo[];
|
|
78
|
-
audios?: AudioTrackData[];
|
|
79
|
-
builtin_texts?: BuiltinTextTrackData[];
|
|
80
|
-
external_texts?: ExternalTextTrackData[];
|
|
81
|
-
thumbnail_timeout?: number;
|
|
82
|
-
};
|
|
83
|
-
media_data: MediaDataField;
|
|
84
|
-
txt_data: TxtDataField;
|
|
85
|
-
file_data: FileDataField;
|
|
31
|
+
media_data: MediaGroupData;
|
|
32
|
+
txt_data: TxtGroupData;
|
|
33
|
+
source_data: SourceGroupData;
|
|
86
34
|
baidu_data: Record<string, {
|
|
87
35
|
fs_id: number;
|
|
88
36
|
md4: string;
|
|
@@ -96,21 +44,6 @@ export declare class UploadFile {
|
|
|
96
44
|
updated_at: Date;
|
|
97
45
|
created_at: Date;
|
|
98
46
|
}
|
|
99
|
-
export type TextInfo = {
|
|
100
|
-
file: string;
|
|
101
|
-
file_path: string;
|
|
102
|
-
size: number;
|
|
103
|
-
lang: string;
|
|
104
|
-
title: string;
|
|
105
|
-
builtin: boolean;
|
|
106
|
-
type: SubtitleType;
|
|
107
|
-
source: {
|
|
108
|
-
file: string;
|
|
109
|
-
file_path: string;
|
|
110
|
-
size: number;
|
|
111
|
-
type: SubtitleType;
|
|
112
|
-
} | null;
|
|
113
|
-
};
|
|
114
47
|
export declare const getUploadResetFields: () => {
|
|
115
48
|
error: {};
|
|
116
49
|
is_paused: boolean;
|
|
@@ -126,272 +59,8 @@ export declare const getUploadResetFields: () => {
|
|
|
126
59
|
baidu_data: {};
|
|
127
60
|
ali_data: {};
|
|
128
61
|
};
|
|
129
|
-
type SuccessFileInfo = {
|
|
130
|
-
start: number;
|
|
131
|
-
end: number;
|
|
132
|
-
size: number;
|
|
133
|
-
file: string;
|
|
134
|
-
};
|
|
135
|
-
type VideoMetaType = {
|
|
136
|
-
duration: number;
|
|
137
|
-
audio_codec: string;
|
|
138
|
-
audio_framerate: number;
|
|
139
|
-
audio_bitrate: number;
|
|
140
|
-
video_codec: string;
|
|
141
|
-
video_bitrate: number;
|
|
142
|
-
video_framerate: number;
|
|
143
|
-
video_width: number;
|
|
144
|
-
video_height: number;
|
|
145
|
-
};
|
|
146
|
-
export type MediaGrouperData = {
|
|
147
|
-
parts: {
|
|
148
|
-
file: string;
|
|
149
|
-
path: string;
|
|
150
|
-
size: number;
|
|
151
|
-
md5: string;
|
|
152
|
-
start: number;
|
|
153
|
-
end: number;
|
|
154
|
-
md4?: string;
|
|
155
|
-
sha1?: string;
|
|
156
|
-
}[];
|
|
157
|
-
meta: VideoMetaType;
|
|
158
|
-
m3u8: SuccessFileInfo;
|
|
159
|
-
subtitles: VideoSubtitleListType;
|
|
160
|
-
thumbnails?: VideoThumbnailsInfoType;
|
|
161
|
-
};
|
|
162
|
-
type ProgressData = Record<UploadProgressStep, {
|
|
163
|
-
weight: number;
|
|
164
|
-
percent: number;
|
|
165
|
-
}>;
|
|
166
62
|
export type RecordFolderInfo = {
|
|
167
63
|
record_id?: number;
|
|
168
64
|
[HostType.ALI]?: string;
|
|
169
65
|
[HostType.BAIDU]?: string;
|
|
170
66
|
};
|
|
171
|
-
export type MediaTrackQualityInfo = {
|
|
172
|
-
codec: string;
|
|
173
|
-
codec_name: string;
|
|
174
|
-
channels: number;
|
|
175
|
-
language: string;
|
|
176
|
-
order: number;
|
|
177
|
-
m3u8: M3U8Manifest;
|
|
178
|
-
m3u8_path: string;
|
|
179
|
-
bandwidth: number;
|
|
180
|
-
average_bandwidth: number;
|
|
181
|
-
};
|
|
182
|
-
export type AudioTrackItem = {
|
|
183
|
-
high?: MediaTrackQualityInfo;
|
|
184
|
-
adapt: MediaTrackQualityInfo;
|
|
185
|
-
};
|
|
186
|
-
export type VideoTrackItem = {
|
|
187
|
-
m3u8: M3U8Manifest;
|
|
188
|
-
m3u8_path: string;
|
|
189
|
-
bandwidth: number;
|
|
190
|
-
average_bandwidth: number;
|
|
191
|
-
codec: string;
|
|
192
|
-
codec_name: string;
|
|
193
|
-
width: number;
|
|
194
|
-
height: number;
|
|
195
|
-
bitdepth: number;
|
|
196
|
-
framerate: number;
|
|
197
|
-
bitrate: number;
|
|
198
|
-
label: string;
|
|
199
|
-
};
|
|
200
|
-
export type MediaThumbnailInfo = {
|
|
201
|
-
row: number;
|
|
202
|
-
col: number;
|
|
203
|
-
width: number;
|
|
204
|
-
height: number;
|
|
205
|
-
tile_list: {
|
|
206
|
-
file: string;
|
|
207
|
-
file_path: string;
|
|
208
|
-
size: number;
|
|
209
|
-
}[];
|
|
210
|
-
sprite_list: {
|
|
211
|
-
file: string;
|
|
212
|
-
st: number;
|
|
213
|
-
et: number;
|
|
214
|
-
x: number;
|
|
215
|
-
y: number;
|
|
216
|
-
w: number;
|
|
217
|
-
h: number;
|
|
218
|
-
}[];
|
|
219
|
-
};
|
|
220
|
-
export type FileDataField = {
|
|
221
|
-
size: number;
|
|
222
|
-
head: string;
|
|
223
|
-
parts: FilePartItem[];
|
|
224
|
-
};
|
|
225
|
-
export type MediaDataField = {
|
|
226
|
-
video_tracks: VideoTrackItem[] | null;
|
|
227
|
-
audio_tracks: AudioTrackItem[] | null;
|
|
228
|
-
text_tracks: TextInfo[] | null;
|
|
229
|
-
thumbnail_info: MediaThumbnailInfo | null;
|
|
230
|
-
cover_list: {
|
|
231
|
-
file: string;
|
|
232
|
-
file_path: string;
|
|
233
|
-
size: number;
|
|
234
|
-
width: number;
|
|
235
|
-
height: number;
|
|
236
|
-
start_time: number;
|
|
237
|
-
end_time: number;
|
|
238
|
-
}[];
|
|
239
|
-
media_group: MediaGroupData;
|
|
240
|
-
};
|
|
241
|
-
type GroupFileInfo = {
|
|
242
|
-
file: string;
|
|
243
|
-
size: number;
|
|
244
|
-
start: number;
|
|
245
|
-
end: number;
|
|
246
|
-
hash?: string;
|
|
247
|
-
};
|
|
248
|
-
export type MediaGroupQualityAudioItem = {
|
|
249
|
-
average_band: number;
|
|
250
|
-
band: number;
|
|
251
|
-
channels: number;
|
|
252
|
-
codec: string;
|
|
253
|
-
codec_name: string;
|
|
254
|
-
language: string;
|
|
255
|
-
order: number;
|
|
256
|
-
} & GroupFileInfo;
|
|
257
|
-
export type MediaGroupAudioItem = MediaGroupQualityAudioItem & {
|
|
258
|
-
high?: MediaGroupQualityAudioItem;
|
|
259
|
-
};
|
|
260
|
-
export type MediaGroupThumbnailInfo = {
|
|
261
|
-
row: number;
|
|
262
|
-
col: number;
|
|
263
|
-
width: number;
|
|
264
|
-
height: number;
|
|
265
|
-
} & GroupFileInfo;
|
|
266
|
-
export type MediaGroupCoverInfo = {
|
|
267
|
-
width: number;
|
|
268
|
-
height: number;
|
|
269
|
-
start_time: number;
|
|
270
|
-
} & GroupFileInfo;
|
|
271
|
-
export type MediaGroupVideoItem = {
|
|
272
|
-
label: string;
|
|
273
|
-
average_band: number;
|
|
274
|
-
band: number;
|
|
275
|
-
codec: string;
|
|
276
|
-
codec_name: string;
|
|
277
|
-
framerate: number;
|
|
278
|
-
bitdepth: number;
|
|
279
|
-
width: number;
|
|
280
|
-
height: number;
|
|
281
|
-
} & GroupFileInfo;
|
|
282
|
-
export type FilePartItem = {
|
|
283
|
-
start: number;
|
|
284
|
-
end: number;
|
|
285
|
-
size: number;
|
|
286
|
-
file: string;
|
|
287
|
-
path: string;
|
|
288
|
-
index?: number;
|
|
289
|
-
md4?: string;
|
|
290
|
-
md5?: string;
|
|
291
|
-
sha1?: string;
|
|
292
|
-
};
|
|
293
|
-
export type MediaGroupData = {
|
|
294
|
-
video_meta: ManifestVideoMetaInfo;
|
|
295
|
-
audio_meta: ManifestAudioMetaInfo;
|
|
296
|
-
audios: MediaGroupAudioItem[];
|
|
297
|
-
videos: MediaGroupVideoItem[];
|
|
298
|
-
texts: ManifestTextItem[];
|
|
299
|
-
thumbnail: MediaGroupThumbnailInfo;
|
|
300
|
-
cover: MediaGroupCoverInfo;
|
|
301
|
-
parts: FilePartItem[];
|
|
302
|
-
};
|
|
303
|
-
export type VideoSubtitleItemType = {
|
|
304
|
-
file: string;
|
|
305
|
-
title: string;
|
|
306
|
-
lang: string;
|
|
307
|
-
start: number;
|
|
308
|
-
end: number;
|
|
309
|
-
size: number;
|
|
310
|
-
type: string;
|
|
311
|
-
source: null | {
|
|
312
|
-
file: string;
|
|
313
|
-
size: number;
|
|
314
|
-
start: number;
|
|
315
|
-
end: number;
|
|
316
|
-
type: string;
|
|
317
|
-
};
|
|
318
|
-
};
|
|
319
|
-
export type VideoSubtitleListType = VideoSubtitleItemType[];
|
|
320
|
-
export type VideoThumbnailsInfoType = {
|
|
321
|
-
file: string;
|
|
322
|
-
row: number;
|
|
323
|
-
col: number;
|
|
324
|
-
duration: number;
|
|
325
|
-
width: number;
|
|
326
|
-
height: number;
|
|
327
|
-
start: number;
|
|
328
|
-
end: number;
|
|
329
|
-
size: number;
|
|
330
|
-
};
|
|
331
|
-
export type AudioTrackData = {
|
|
332
|
-
adapt: {
|
|
333
|
-
need: boolean;
|
|
334
|
-
codec: string;
|
|
335
|
-
channels: number;
|
|
336
|
-
need_transcode: boolean;
|
|
337
|
-
weight: number;
|
|
338
|
-
info?: AudioTrackInfo;
|
|
339
|
-
};
|
|
340
|
-
high: {
|
|
341
|
-
need: boolean;
|
|
342
|
-
codec: string;
|
|
343
|
-
channels: number;
|
|
344
|
-
need_transcode: boolean;
|
|
345
|
-
weight: number;
|
|
346
|
-
info?: AudioTrackInfo;
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
export type TextTrackData = {
|
|
350
|
-
adapt: {
|
|
351
|
-
need: boolean;
|
|
352
|
-
codec: string;
|
|
353
|
-
weight: number;
|
|
354
|
-
info?: TextTrackInfo;
|
|
355
|
-
};
|
|
356
|
-
high: {
|
|
357
|
-
need: boolean;
|
|
358
|
-
codec: string;
|
|
359
|
-
weight: number;
|
|
360
|
-
info?: TextTrackInfo;
|
|
361
|
-
};
|
|
362
|
-
};
|
|
363
|
-
export type BuiltinTextFieldData = {
|
|
364
|
-
lang: string;
|
|
365
|
-
title: string;
|
|
366
|
-
path: string;
|
|
367
|
-
};
|
|
368
|
-
export type BuiltinTextTrackData = {
|
|
369
|
-
lang: string;
|
|
370
|
-
title: string;
|
|
371
|
-
weight: number;
|
|
372
|
-
index: number;
|
|
373
|
-
info?: TextInfo;
|
|
374
|
-
};
|
|
375
|
-
export type ExternalTextTrackData = BuiltinTextTrackData & {
|
|
376
|
-
path: string;
|
|
377
|
-
};
|
|
378
|
-
export type PrepareVideoTrackInfo = {
|
|
379
|
-
need_transcode: boolean;
|
|
380
|
-
codec: string;
|
|
381
|
-
label: string;
|
|
382
|
-
width: number;
|
|
383
|
-
height: number;
|
|
384
|
-
weight: number;
|
|
385
|
-
info?: VideoTrackInfo;
|
|
386
|
-
};
|
|
387
|
-
export type TxtDataField = {
|
|
388
|
-
pages: number;
|
|
389
|
-
pad: number;
|
|
390
|
-
map: {
|
|
391
|
-
file: string;
|
|
392
|
-
start: number;
|
|
393
|
-
end: number;
|
|
394
|
-
};
|
|
395
|
-
parts: FilePartItem[];
|
|
396
|
-
};
|
|
397
|
-
export {};
|
package/dist/upload-file.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var d,p=arguments.length,_=p<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)_=Reflect.decorate(e,t,o,a);else for(var
|
|
1
|
+
"use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var d,p=arguments.length,_=p<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)_=Reflect.decorate(e,t,o,a);else for(var r=e.length-1;r>=0;r--)(d=e[r])&&(_=(p<3?d(_):p>3?d(t,o,_):d(t,o))||_);return p>3&&_&&Object.defineProperty(t,o,_),_},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUploadResetFields=exports.UploadFile=void 0;const typeorm_1=require("typeorm"),types_1=require("@soga/types");let UploadFile=class{id;root_id;root_status;is_folder;task_id;is_paused;config;can_stop;uid;aid;file_total;file_successed;encode_status;upload_status;baidu_host_id;ali_host_id;pid;type;ftype;path;filename;size;task_record_id;record_folder_info;output_root;external_texts;progress;percent;media_data;txt_data;source_data;baidu_data;ali_data;order;updated_at;created_at};exports.UploadFile=UploadFile,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],UploadFile.prototype,"id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({nullable:!0}),__metadata("design:type",Number)],UploadFile.prototype,"root_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RootStatus,default:types_1.RootStatus.NULL}),__metadata("design:type",Number)],UploadFile.prototype,"root_status",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Boolean)],UploadFile.prototype,"is_folder",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"task_id",void 0),__decorate([(0,typeorm_1.Column)({default:!1}),__metadata("design:type",Boolean)],UploadFile.prototype,"is_paused",void 0),__decorate([(0,typeorm_1.Column)("json",{default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"config",void 0),__decorate([(0,typeorm_1.Column)({default:!0}),__metadata("design:type",Boolean)],UploadFile.prototype,"can_stop",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"uid",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"aid",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"file_total",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"file_successed",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.EncodeStatus,default:types_1.EncodeStatus.NULL}),__metadata("design:type",Number)],UploadFile.prototype,"encode_status",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.UploadStatus,default:types_1.UploadStatus.NULL}),__metadata("design:type",Number)],UploadFile.prototype,"upload_status",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"baidu_host_id",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"ali_host_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"pid",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RecordType}),__metadata("design:type",Number)],UploadFile.prototype,"type",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RecordFtype,default:types_1.RecordFtype.NONE}),__metadata("design:type",Number)],UploadFile.prototype,"ftype",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadFile.prototype,"path",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],UploadFile.prototype,"filename",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"size",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"task_record_id",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],UploadFile.prototype,"record_folder_info",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],UploadFile.prototype,"output_root",void 0),__decorate([(0,typeorm_1.Column)("json",{default:"[]"}),__metadata("design:type",Array)],UploadFile.prototype,"external_texts",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],UploadFile.prototype,"progress",void 0),__decorate([(0,typeorm_1.Column)({default:0,type:"decimal"}),__metadata("design:type",Number)],UploadFile.prototype,"percent",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"media_data",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"txt_data",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"source_data",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"baidu_data",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"ali_data",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"order",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],UploadFile.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],UploadFile.prototype,"created_at",void 0),exports.UploadFile=UploadFile=__decorate([(0,typeorm_1.Index)(["uid","is_folder"]),(0,typeorm_1.Entity)()],UploadFile);const getUploadResetFields=()=>({error:{},is_paused:!1,output_root:"",encode_status:types_1.EncodeStatus.NULL,upload_status:types_1.UploadStatus.NULL,progress:null,percent:0,prepare_data:{},media_data:{},txt_data:{},file_data:{},baidu_data:{},ali_data:{}});exports.getUploadResetFields=getUploadResetFields;
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@soga/entities",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"access": "public"
|
|
6
|
-
},
|
|
7
|
-
"description": "",
|
|
8
|
-
"main": "dist/main.js",
|
|
9
|
-
"types": "dist/main.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "rimraf dist && tsc && ts-node ./scripts/minify",
|
|
15
|
-
"minify": "ts-node ./scripts/minify",
|
|
16
|
-
"demo": "ts-node ./demo/demo.ts",
|
|
17
|
-
"test": "jest",
|
|
18
|
-
"dev": "ts-node ./src/main.ts",
|
|
19
|
-
"lint": "eslint . --ext .ts",
|
|
20
|
-
"prepublishOnly": "npm run build"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@types/glob": "^8.1.0",
|
|
24
|
-
"@types/jest": "^29.5.4",
|
|
25
|
-
"@types/node": "^20.8.7",
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
27
|
-
"@typescript-eslint/parser": "^6.4.1",
|
|
28
|
-
"eslint": "^8.47.0",
|
|
29
|
-
"eslint-config-prettier": "^9.0.0",
|
|
30
|
-
"eslint-plugin-jest": "^27.2.3",
|
|
31
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
32
|
-
"glob": "^10.3.3",
|
|
33
|
-
"jest": "^29.6.3",
|
|
34
|
-
"prettier": "^3.0.2",
|
|
35
|
-
"terser": "^5.19.2",
|
|
36
|
-
"ts-jest": "^29.1.1",
|
|
37
|
-
"ts-node": "^10.9.1",
|
|
38
|
-
"typeorm": "^0.3.20",
|
|
39
|
-
"typescript": "^5.1.6"
|
|
40
|
-
},
|
|
41
|
-
"keywords": [],
|
|
42
|
-
"author": "",
|
|
43
|
-
"license": "ISC",
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@soga/types": "^0.0.
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@soga/entities",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "",
|
|
8
|
+
"main": "dist/main.js",
|
|
9
|
+
"types": "dist/main.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "rimraf dist && tsc && ts-node ./scripts/minify",
|
|
15
|
+
"minify": "ts-node ./scripts/minify",
|
|
16
|
+
"demo": "ts-node ./demo/demo.ts",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"dev": "ts-node ./src/main.ts",
|
|
19
|
+
"lint": "eslint . --ext .ts",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/glob": "^8.1.0",
|
|
24
|
+
"@types/jest": "^29.5.4",
|
|
25
|
+
"@types/node": "^20.8.7",
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
27
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
28
|
+
"eslint": "^8.47.0",
|
|
29
|
+
"eslint-config-prettier": "^9.0.0",
|
|
30
|
+
"eslint-plugin-jest": "^27.2.3",
|
|
31
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
32
|
+
"glob": "^10.3.3",
|
|
33
|
+
"jest": "^29.6.3",
|
|
34
|
+
"prettier": "^3.0.2",
|
|
35
|
+
"terser": "^5.19.2",
|
|
36
|
+
"ts-jest": "^29.1.1",
|
|
37
|
+
"ts-node": "^10.9.1",
|
|
38
|
+
"typeorm": "^0.3.20",
|
|
39
|
+
"typescript": "^5.1.6"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [],
|
|
42
|
+
"author": "",
|
|
43
|
+
"license": "ISC",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@soga/types": "^0.0.60"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/dist/data-cache.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare enum CacheScope {
|
|
2
|
-
DOWNLOAD = "download",
|
|
3
|
-
UPLOAD = "upload",
|
|
4
|
-
ENCODE = "encode"
|
|
5
|
-
}
|
|
6
|
-
export declare class DataCache {
|
|
7
|
-
id: number;
|
|
8
|
-
scope: CacheScope;
|
|
9
|
-
group: string;
|
|
10
|
-
sn: number;
|
|
11
|
-
data: unknown;
|
|
12
|
-
can_clean: boolean;
|
|
13
|
-
updated_at: Date;
|
|
14
|
-
created_at: Date;
|
|
15
|
-
}
|
package/dist/data-cache.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __decorate=this&&this.__decorate||function(e,t,a,o){var r,p=arguments.length,c=p<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,a,o);else for(var d=e.length-1;d>=0;d--)(r=e[d])&&(c=(p<3?r(c):p>3?r(t,a,c):r(t,a))||c);return p>3&&c&&Object.defineProperty(t,a,c),c},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataCache=exports.CacheScope=void 0;const typeorm_1=require("typeorm");var CacheScope;!function(e){e.DOWNLOAD="download",e.UPLOAD="upload",e.ENCODE="encode"}(CacheScope||(exports.CacheScope=CacheScope={}));let DataCache=class{id;scope;group;sn;data;can_clean;updated_at;created_at};exports.DataCache=DataCache,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],DataCache.prototype,"id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:CacheScope}),__metadata("design:type",String)],DataCache.prototype,"scope",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({nullable:!0}),__metadata("design:type",String)],DataCache.prototype,"group",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],DataCache.prototype,"sn",void 0),__decorate([(0,typeorm_1.Column)({type:"json"}),__metadata("design:type",Object)],DataCache.prototype,"data",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:!0}),__metadata("design:type",Boolean)],DataCache.prototype,"can_clean",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],DataCache.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],DataCache.prototype,"created_at",void 0),exports.DataCache=DataCache=__decorate([(0,typeorm_1.Index)(["can_clean","created_at"]),(0,typeorm_1.Index)(["scope","group","sn"],{unique:!0}),(0,typeorm_1.Index)(["scope","sn"]),(0,typeorm_1.Entity)()],DataCache);
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
export type GeneralInfo = {
|
|
2
|
-
audioCount: number;
|
|
3
|
-
videoCount: number;
|
|
4
|
-
textCount: number;
|
|
5
|
-
fileSize: number;
|
|
6
|
-
codec: string;
|
|
7
|
-
title: string;
|
|
8
|
-
duration: number;
|
|
9
|
-
extra?: {
|
|
10
|
-
duration: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type AudioTrackInfo = {
|
|
14
|
-
is_default: boolean;
|
|
15
|
-
order: number;
|
|
16
|
-
codec: string;
|
|
17
|
-
bitrate: number;
|
|
18
|
-
framerate: number;
|
|
19
|
-
channels: number;
|
|
20
|
-
duration: number;
|
|
21
|
-
lossless: boolean;
|
|
22
|
-
};
|
|
23
|
-
export type VideoTrackInfo = {
|
|
24
|
-
is_default: boolean;
|
|
25
|
-
order: number;
|
|
26
|
-
width: number;
|
|
27
|
-
height: number;
|
|
28
|
-
codec: string;
|
|
29
|
-
framerate: number;
|
|
30
|
-
bitrate: number;
|
|
31
|
-
duration: number;
|
|
32
|
-
bitdepth: number;
|
|
33
|
-
};
|
|
34
|
-
export type TextTrackInfo = {
|
|
35
|
-
is_default: boolean;
|
|
36
|
-
codec: string;
|
|
37
|
-
order: number;
|
|
38
|
-
duration: number;
|
|
39
|
-
language?: string;
|
|
40
|
-
title?: string;
|
|
41
|
-
is_vtt?: boolean;
|
|
42
|
-
};
|
|
43
|
-
export type TracksMap = {
|
|
44
|
-
general?: GeneralInfo;
|
|
45
|
-
audio?: AudioTrackInfo[];
|
|
46
|
-
video?: VideoTrackInfo[];
|
|
47
|
-
text?: TextTrackInfo[];
|
|
48
|
-
};
|
|
49
|
-
export type RawGeneralInfo = {
|
|
50
|
-
'@type': 'General';
|
|
51
|
-
AudioCount: string;
|
|
52
|
-
Duration: string;
|
|
53
|
-
Encoded_Application: string;
|
|
54
|
-
Encoded_Date: string;
|
|
55
|
-
Encoded_Library: string;
|
|
56
|
-
FileSize: string;
|
|
57
|
-
Format: string;
|
|
58
|
-
Format_Version: string;
|
|
59
|
-
FrameCount: string;
|
|
60
|
-
FrameRate: string;
|
|
61
|
-
IsStreamable: 'Yes' | 'No';
|
|
62
|
-
OverallBitRate: string;
|
|
63
|
-
StreamSize: string;
|
|
64
|
-
TextCount: string;
|
|
65
|
-
UniqueID: string;
|
|
66
|
-
VideoCount: string;
|
|
67
|
-
[key: string]: string;
|
|
68
|
-
};
|
|
69
|
-
export type RawAudioInfo = {
|
|
70
|
-
'@type': 'Audio';
|
|
71
|
-
'@typeorder': string;
|
|
72
|
-
BitRate: string;
|
|
73
|
-
BitRate_Mode: string;
|
|
74
|
-
ChannelLayout: string;
|
|
75
|
-
ChannelPositions: string;
|
|
76
|
-
Channels: string;
|
|
77
|
-
CodecID: string;
|
|
78
|
-
Compression_Mode: 'Lossy' | 'Lossless';
|
|
79
|
-
Default: 'Yes' | 'No';
|
|
80
|
-
Delay: string;
|
|
81
|
-
Delay_Source: string;
|
|
82
|
-
Duration: string;
|
|
83
|
-
Forced: string;
|
|
84
|
-
Format: string;
|
|
85
|
-
Format_Commercial_IfAny: string;
|
|
86
|
-
Format_Settings_Endianness: string;
|
|
87
|
-
FrameRate: string;
|
|
88
|
-
ID: string;
|
|
89
|
-
Language: string;
|
|
90
|
-
SamplesPerFrame: string;
|
|
91
|
-
SamplingCount: string;
|
|
92
|
-
SamplingRate: string;
|
|
93
|
-
ServiceKind: string;
|
|
94
|
-
StreamOrder: string;
|
|
95
|
-
StreamSize: string;
|
|
96
|
-
StreamSize_Proportion: string;
|
|
97
|
-
UniqueID: string;
|
|
98
|
-
[key: string]: string;
|
|
99
|
-
};
|
|
100
|
-
export type RawVideoInfo = {
|
|
101
|
-
'@type': 'Video';
|
|
102
|
-
Default: 'Yes' | 'No';
|
|
103
|
-
StreamOrder: string;
|
|
104
|
-
Width: string;
|
|
105
|
-
Height: string;
|
|
106
|
-
Language: string;
|
|
107
|
-
BitDepth: string;
|
|
108
|
-
BitRate: string;
|
|
109
|
-
BitRate_Nominal: string;
|
|
110
|
-
ChromaSubsampling: string;
|
|
111
|
-
CodecID: string;
|
|
112
|
-
ColorSpace: string;
|
|
113
|
-
Delay: string;
|
|
114
|
-
DisplayAspectRatio: string;
|
|
115
|
-
Duration: string;
|
|
116
|
-
Encoded_Library: string;
|
|
117
|
-
Encoded_Library_Name: string;
|
|
118
|
-
Encoded_Library_Settings: string;
|
|
119
|
-
Encoded_Library_Version: string;
|
|
120
|
-
Forced: string;
|
|
121
|
-
Format: string;
|
|
122
|
-
Format_Level: string;
|
|
123
|
-
Format_Profile: string;
|
|
124
|
-
Format_Settings_CABAC: string;
|
|
125
|
-
Format_Settings_RefFrames: string;
|
|
126
|
-
FrameCount: string;
|
|
127
|
-
FrameRate: string;
|
|
128
|
-
FrameRate_Mode: string;
|
|
129
|
-
ID: string;
|
|
130
|
-
PixelAspectRatio: string;
|
|
131
|
-
Sampled_Height: string;
|
|
132
|
-
Sampled_Width: string;
|
|
133
|
-
ScanType: string;
|
|
134
|
-
StreamSize: string;
|
|
135
|
-
UniqueID: string;
|
|
136
|
-
[key: string]: string;
|
|
137
|
-
};
|
|
138
|
-
export type RawTextInfo = {
|
|
139
|
-
'@type': 'Text';
|
|
140
|
-
'@typeorder': string;
|
|
141
|
-
CodecID: string;
|
|
142
|
-
Compression_Mode: string;
|
|
143
|
-
Default: 'Yes' | 'No';
|
|
144
|
-
Forced: string;
|
|
145
|
-
Format: string;
|
|
146
|
-
ID: string;
|
|
147
|
-
StreamOrder: string;
|
|
148
|
-
UniqueID: string;
|
|
149
|
-
Duration: string;
|
|
150
|
-
[key: string]: string;
|
|
151
|
-
};
|
|
152
|
-
export type MediaTrackItem = RawGeneralInfo | RawAudioInfo | RawVideoInfo | RawTextInfo;
|
|
153
|
-
export type RawMediainfo = {
|
|
154
|
-
creatingLibrary: {
|
|
155
|
-
name: string;
|
|
156
|
-
version: string;
|
|
157
|
-
url: string;
|
|
158
|
-
};
|
|
159
|
-
media: {
|
|
160
|
-
track: MediaTrackItem[];
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
export type StandardKey = 'h_p360' | 'h_p540' | 'h_p720' | 'h_p1080' | 'h_p1440' | 'h_k4' | 'h_k8' | 'h_k16' | 'h_k32' | 'h_k32plus' | 'v_p360' | 'v_p540' | 'v_p720' | 'v_p1080' | 'v_p1440' | 'v_k4' | 'v_k8' | 'v_k16' | 'v_k32' | 'v_k32plus';
|
|
164
|
-
export type StandardItem = {
|
|
165
|
-
key: StandardKey;
|
|
166
|
-
is_horizontal: boolean;
|
|
167
|
-
width: number;
|
|
168
|
-
height: number;
|
|
169
|
-
label: string;
|
|
170
|
-
tag: string;
|
|
171
|
-
edge: 'width' | 'height';
|
|
172
|
-
codec: string;
|
|
173
|
-
};
|
|
174
|
-
export type Mp4boxVideoInfo = {
|
|
175
|
-
id: number;
|
|
176
|
-
name?: 'VideoHandler';
|
|
177
|
-
references: any[];
|
|
178
|
-
edits: {
|
|
179
|
-
segment_duration: number;
|
|
180
|
-
media_time: number;
|
|
181
|
-
media_rate_integer: number;
|
|
182
|
-
media_rate_fraction: number;
|
|
183
|
-
}[];
|
|
184
|
-
created: string;
|
|
185
|
-
modified: string;
|
|
186
|
-
movie_duration: number;
|
|
187
|
-
movie_timescale: number;
|
|
188
|
-
layer: number;
|
|
189
|
-
alternate_group: number;
|
|
190
|
-
volume: number;
|
|
191
|
-
track_width: number;
|
|
192
|
-
track_height: number;
|
|
193
|
-
timescale: number;
|
|
194
|
-
duration: number;
|
|
195
|
-
samples_duration: number;
|
|
196
|
-
codec: string;
|
|
197
|
-
kind: {
|
|
198
|
-
schemeURI: string;
|
|
199
|
-
value: string;
|
|
200
|
-
};
|
|
201
|
-
language: string;
|
|
202
|
-
nb_samples: number;
|
|
203
|
-
size: number;
|
|
204
|
-
bitrate: number;
|
|
205
|
-
type: 'video';
|
|
206
|
-
video: {
|
|
207
|
-
width: number;
|
|
208
|
-
height: number;
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
export type Mp4boxAudioInfo = {
|
|
212
|
-
id: number;
|
|
213
|
-
name?: 'SoundHandler';
|
|
214
|
-
references: any[];
|
|
215
|
-
edits: {
|
|
216
|
-
segment_duration: number;
|
|
217
|
-
media_time: number;
|
|
218
|
-
media_rate_integer: number;
|
|
219
|
-
media_rate_fraction: number;
|
|
220
|
-
}[];
|
|
221
|
-
created: string;
|
|
222
|
-
modified: string;
|
|
223
|
-
movie_duration: number;
|
|
224
|
-
movie_timescale: number;
|
|
225
|
-
layer: number;
|
|
226
|
-
alternate_group: number;
|
|
227
|
-
volume: number;
|
|
228
|
-
track_width: number;
|
|
229
|
-
track_height: number;
|
|
230
|
-
timescale: number;
|
|
231
|
-
duration: number;
|
|
232
|
-
samples_duration: number;
|
|
233
|
-
codec: string;
|
|
234
|
-
kind: {
|
|
235
|
-
schemeURI: string;
|
|
236
|
-
value: string;
|
|
237
|
-
};
|
|
238
|
-
language: string;
|
|
239
|
-
nb_samples: number;
|
|
240
|
-
size: number;
|
|
241
|
-
bitrate: number;
|
|
242
|
-
type: 'audio';
|
|
243
|
-
audio: {
|
|
244
|
-
sample_rate: number;
|
|
245
|
-
channel_count: number;
|
|
246
|
-
sample_size: number;
|
|
247
|
-
};
|
|
248
|
-
};
|
package/dist/mediainfo.types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|