@video-editor/protocol 0.0.1-beta.14 → 0.0.1-beta.15
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 +23 -1
- package/dist/index.js +6107 -5776
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,9 @@ import { TrackUnion } from '@video-editor/shared';
|
|
|
23
23
|
export declare function createResourceManager(opts?: {
|
|
24
24
|
dir?: string;
|
|
25
25
|
}): {
|
|
26
|
-
add: (url: string
|
|
26
|
+
add: (url: string, opts?: {
|
|
27
|
+
body?: ReadableStream<BufferSource>;
|
|
28
|
+
}) => Promise<void>;
|
|
27
29
|
get: (url: string) => Promise<void | HTMLImageElement | ISamples[]>;
|
|
28
30
|
remove: (url: string) => Promise<void>;
|
|
29
31
|
clear: () => Promise<void>;
|
|
@@ -485,6 +487,17 @@ declare interface GenerateThumbnailsOptions {
|
|
|
485
487
|
resourceDir?: string;
|
|
486
488
|
}
|
|
487
489
|
|
|
490
|
+
export declare function getMp4Meta(url: string, options?: {
|
|
491
|
+
resourceDir?: string;
|
|
492
|
+
}): Promise<Mp4Meta>;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Convert a user-provided URL into a stable, OPFS-safe key.
|
|
496
|
+
* - Removes query/hash so signed URLs map to a single cached entry.
|
|
497
|
+
* - Avoids `://` and other path-unfriendly sequences by encoding segments.
|
|
498
|
+
*/
|
|
499
|
+
export declare function getResourceKey(url: string): string;
|
|
500
|
+
|
|
488
501
|
export declare function getResourceType(url: string): Promise<{
|
|
489
502
|
type: IResType;
|
|
490
503
|
totalSize: number;
|
|
@@ -510,6 +523,15 @@ export { ITrackType }
|
|
|
510
523
|
|
|
511
524
|
export { IVideoProtocol }
|
|
512
525
|
|
|
526
|
+
declare interface Mp4Meta {
|
|
527
|
+
durationUs: number;
|
|
528
|
+
durationMs: number;
|
|
529
|
+
width: number;
|
|
530
|
+
height: number;
|
|
531
|
+
audioSampleRate: number;
|
|
532
|
+
audioChanCount: number;
|
|
533
|
+
}
|
|
534
|
+
|
|
513
535
|
declare type OPFSToolFile = ReturnType<typeof file>;
|
|
514
536
|
|
|
515
537
|
export declare const parse: parseFn;
|