@video-editor/protocol 0.0.1-beta.1 → 0.0.1-beta.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/dist/index.d.ts +47 -0
- package/dist/index.js +12284 -7737
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -111,6 +111,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
111
111
|
readonly startTime: number;
|
|
112
112
|
readonly endTime: number;
|
|
113
113
|
readonly segmentType: "frames";
|
|
114
|
+
readonly extra?: {
|
|
115
|
+
readonly [x: string]: Readonly<unknown>;
|
|
116
|
+
} | null | undefined;
|
|
114
117
|
} | {
|
|
115
118
|
readonly type: "image";
|
|
116
119
|
readonly format: "img" | "gif";
|
|
@@ -158,6 +161,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
158
161
|
readonly startTime: number;
|
|
159
162
|
readonly endTime: number;
|
|
160
163
|
readonly segmentType: "frames";
|
|
164
|
+
readonly extra?: {
|
|
165
|
+
readonly [x: string]: Readonly<unknown>;
|
|
166
|
+
} | null | undefined;
|
|
161
167
|
} | {
|
|
162
168
|
readonly type: "3D";
|
|
163
169
|
readonly url: string;
|
|
@@ -204,6 +210,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
204
210
|
readonly startTime: number;
|
|
205
211
|
readonly endTime: number;
|
|
206
212
|
readonly segmentType: "frames";
|
|
213
|
+
readonly extra?: {
|
|
214
|
+
readonly [x: string]: Readonly<unknown>;
|
|
215
|
+
} | null | undefined;
|
|
207
216
|
})[];
|
|
208
217
|
readonly isMain?: boolean | undefined;
|
|
209
218
|
}[];
|
|
@@ -257,6 +266,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
257
266
|
readonly startTime: number;
|
|
258
267
|
readonly endTime: number;
|
|
259
268
|
readonly url?: string | undefined;
|
|
269
|
+
readonly extra?: {
|
|
270
|
+
readonly [x: string]: Readonly<unknown>;
|
|
271
|
+
} | null | undefined;
|
|
260
272
|
}[];
|
|
261
273
|
}[];
|
|
262
274
|
image: readonly {
|
|
@@ -296,6 +308,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
296
308
|
readonly id: string;
|
|
297
309
|
readonly startTime: number;
|
|
298
310
|
readonly endTime: number;
|
|
311
|
+
readonly extra?: {
|
|
312
|
+
readonly [x: string]: Readonly<unknown>;
|
|
313
|
+
} | null | undefined;
|
|
299
314
|
}[];
|
|
300
315
|
}[];
|
|
301
316
|
audio: readonly {
|
|
@@ -312,6 +327,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
312
327
|
readonly id: string;
|
|
313
328
|
readonly startTime: number;
|
|
314
329
|
readonly endTime: number;
|
|
330
|
+
readonly extra?: {
|
|
331
|
+
readonly [x: string]: Readonly<unknown>;
|
|
332
|
+
} | null | undefined;
|
|
315
333
|
}[];
|
|
316
334
|
}[];
|
|
317
335
|
effect: readonly {
|
|
@@ -325,6 +343,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
325
343
|
readonly startTime: number;
|
|
326
344
|
readonly endTime: number;
|
|
327
345
|
readonly url?: string | undefined;
|
|
346
|
+
readonly extra?: {
|
|
347
|
+
readonly [x: string]: Readonly<unknown>;
|
|
348
|
+
} | null | undefined;
|
|
328
349
|
}[];
|
|
329
350
|
}[];
|
|
330
351
|
filter: readonly {
|
|
@@ -339,6 +360,9 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
339
360
|
readonly startTime: number;
|
|
340
361
|
readonly endTime: number;
|
|
341
362
|
readonly url?: string | undefined;
|
|
363
|
+
readonly extra?: {
|
|
364
|
+
readonly [x: string]: Readonly<unknown>;
|
|
365
|
+
} | null | undefined;
|
|
342
366
|
}[];
|
|
343
367
|
}[];
|
|
344
368
|
}>;
|
|
@@ -357,6 +381,8 @@ export declare function createVideoProtocolManager(protocol: IVideoProtocol): {
|
|
|
357
381
|
undoCount: ComputedRef<number>;
|
|
358
382
|
};
|
|
359
383
|
|
|
384
|
+
export declare const DEFAULT_RESOURCE_DIR = "/video-editor-res";
|
|
385
|
+
|
|
360
386
|
export declare const DUPLICATE_SEGMENT_ID = "duplicate segment id";
|
|
361
387
|
|
|
362
388
|
export declare const DUPLICATE_TRACK_ID = "duplicate track id";
|
|
@@ -379,6 +405,22 @@ export declare function fileToMP4Samples(input: string | OPFSToolFile, cbs: {
|
|
|
379
405
|
stop: () => void;
|
|
380
406
|
}>;
|
|
381
407
|
|
|
408
|
+
/** Generate thumbnails for a video, preferring OPFS resources with network fallback. */
|
|
409
|
+
export declare function generateThumbnails(url: string, options?: GenerateThumbnailsOptions): Promise<Thumbnail[]>;
|
|
410
|
+
|
|
411
|
+
declare interface GenerateThumbnailsOptions {
|
|
412
|
+
/** Thumbnail width in pixels (default 100). */
|
|
413
|
+
imgWidth?: number;
|
|
414
|
+
/** Start time in microseconds. */
|
|
415
|
+
start?: number;
|
|
416
|
+
/** End time in microseconds. */
|
|
417
|
+
end?: number;
|
|
418
|
+
/** Step duration in microseconds; fallback to keyframes when omitted. */
|
|
419
|
+
step?: number;
|
|
420
|
+
/** OPFS resource directory; defaults to `/video-editor-res`. */
|
|
421
|
+
resourceDir?: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
382
424
|
export declare function getResourceType(url: string): Promise<{
|
|
383
425
|
type: IResType;
|
|
384
426
|
totalSize: number;
|
|
@@ -414,6 +456,11 @@ declare type PartialByKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T,
|
|
|
414
456
|
|
|
415
457
|
export { SegmentUnion }
|
|
416
458
|
|
|
459
|
+
declare interface Thumbnail {
|
|
460
|
+
ts: number;
|
|
461
|
+
img: Blob;
|
|
462
|
+
}
|
|
463
|
+
|
|
417
464
|
export { TrackTypeMapSegment }
|
|
418
465
|
|
|
419
466
|
export { TrackUnion }
|