@rendley/sdk 1.11.15 → 1.11.17
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/Engine.d.ts +11 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/clip/Clip.d.ts +9 -0
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +1 -0
- package/dist/modules/clip/clips/custom/CustomClip.d.ts +1 -0
- package/dist/modules/clip/clips/htmlText/HtmlTextClip.d.ts +1 -0
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +1 -0
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +1 -0
- package/dist/modules/clip/clips/text/TextClip.d.ts +1 -0
- package/dist/modules/clip/clips/video/VideoClip.d.ts +52 -21
- package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +8 -0
- package/dist/modules/ffmpeg/FFmpeg.d.ts +2 -0
- package/dist/modules/filmstrip-extractor/FilmstripExtractor.d.ts +30 -0
- package/dist/modules/filmstrip-extractor/FilmstripExtractor.types.d.ts +34 -0
- package/dist/modules/filmstrip-extractor/FilmstripExtractorWorker.d.ts +5 -0
- package/dist/modules/library/Library.d.ts +13 -1
- package/dist/modules/library/MediaData.d.ts +32 -3
- package/dist/modules/settings/Settings.d.ts +56 -0
- package/dist/modules/storage/StorageProviderBase.d.ts +1 -0
- package/dist/modules/subtitles/SubtitleManager.d.ts +4 -4
- package/package.json +1 -1
- /package/dist/modules/background-timer/{background-timer.d.ts → BackgroundTimer.d.ts} +0 -0
- /package/dist/modules/background-timer/{backround-timer.types.d.ts → BackgroundTimer.types.d.ts} +0 -0
- /package/dist/modules/background-timer/{background-timer-worker.d.ts → BackgroundTimerWorker.d.ts} +0 -0
|
@@ -24,6 +24,7 @@ export interface MaskOptions {
|
|
|
24
24
|
export interface ClipOptions<K extends ClipStyle = ClipStyle> {
|
|
25
25
|
type?: string;
|
|
26
26
|
id?: string;
|
|
27
|
+
name?: string;
|
|
27
28
|
mediaDataId?: string;
|
|
28
29
|
subtitlesId?: string;
|
|
29
30
|
subtitlesOffset?: number;
|
|
@@ -453,6 +454,7 @@ export declare const AnimationClassSchema: z.ZodObject<{
|
|
|
453
454
|
export declare const ClipSchema: z.ZodObject<{
|
|
454
455
|
id: z.ZodString;
|
|
455
456
|
type: z.ZodString;
|
|
457
|
+
name: z.ZodOptional<z.ZodString>;
|
|
456
458
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
457
459
|
subtitlesId: z.ZodOptional<z.ZodString>;
|
|
458
460
|
subtitlesOffset: z.ZodNumber;
|
|
@@ -928,6 +930,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
928
930
|
}[];
|
|
929
931
|
effects: any[];
|
|
930
932
|
isVisible: boolean;
|
|
933
|
+
name?: string | undefined;
|
|
931
934
|
mediaDataId?: string | undefined;
|
|
932
935
|
subtitlesId?: string | undefined;
|
|
933
936
|
wrapMode?: WrapModeEnum | undefined;
|
|
@@ -1022,6 +1025,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
1022
1025
|
clipId?: string | undefined;
|
|
1023
1026
|
}[];
|
|
1024
1027
|
effects: any[];
|
|
1028
|
+
name?: string | undefined;
|
|
1025
1029
|
mediaDataId?: string | undefined;
|
|
1026
1030
|
subtitlesId?: string | undefined;
|
|
1027
1031
|
wrapMode?: WrapModeEnum | undefined;
|
|
@@ -1104,6 +1108,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
1104
1108
|
}>;
|
|
1105
1109
|
export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipStyle = ClipStyle> {
|
|
1106
1110
|
id: string;
|
|
1111
|
+
protected name: string;
|
|
1107
1112
|
protected startTime: number;
|
|
1108
1113
|
protected duration: number;
|
|
1109
1114
|
protected leftTrim: number;
|
|
@@ -1140,6 +1145,9 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
1140
1145
|
clearAllCustomData(): void;
|
|
1141
1146
|
setAllCustomData(data: Map<string, unknown>): void;
|
|
1142
1147
|
getAllCustomData(): Map<string, unknown> | undefined;
|
|
1148
|
+
getName(): string;
|
|
1149
|
+
hasName(): boolean;
|
|
1150
|
+
setName(name: string): void;
|
|
1143
1151
|
isReady(): boolean;
|
|
1144
1152
|
getId(): string;
|
|
1145
1153
|
getStartTime(): number;
|
|
@@ -1229,6 +1237,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
1229
1237
|
}[];
|
|
1230
1238
|
effects: any[];
|
|
1231
1239
|
isVisible: boolean;
|
|
1240
|
+
name?: string | undefined;
|
|
1232
1241
|
mediaDataId?: string | undefined;
|
|
1233
1242
|
subtitlesId?: string | undefined;
|
|
1234
1243
|
wrapMode?: WrapModeEnum | undefined;
|
|
@@ -72,6 +72,7 @@ export declare class AudioClip extends Clip {
|
|
|
72
72
|
effects: any[];
|
|
73
73
|
isVisible: boolean;
|
|
74
74
|
text?: string | undefined;
|
|
75
|
+
name?: string | undefined;
|
|
75
76
|
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
76
77
|
subtitlesId?: string | undefined;
|
|
77
78
|
blendMode?: import('../../../../types').BlendModeEnum | undefined;
|
|
@@ -25,6 +25,7 @@ export declare class CustomClip extends Clip<PIXI.Sprite, ClipStyle> {
|
|
|
25
25
|
}[];
|
|
26
26
|
effects: any[];
|
|
27
27
|
isVisible: boolean;
|
|
28
|
+
name?: string | undefined;
|
|
28
29
|
mediaDataId?: string | undefined;
|
|
29
30
|
subtitlesId?: string | undefined;
|
|
30
31
|
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
@@ -159,6 +159,7 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
159
159
|
wordWrap: boolean;
|
|
160
160
|
};
|
|
161
161
|
text?: string | undefined;
|
|
162
|
+
name?: string | undefined;
|
|
162
163
|
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
163
164
|
mediaDataId?: string | undefined;
|
|
164
165
|
subtitlesId?: string | undefined;
|
|
@@ -181,6 +181,7 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
181
181
|
isVisible: boolean;
|
|
182
182
|
dataUrl: string;
|
|
183
183
|
text?: string | undefined;
|
|
184
|
+
name?: string | undefined;
|
|
184
185
|
wrapMode?: WrapModeEnum | undefined;
|
|
185
186
|
mediaDataId?: string | undefined;
|
|
186
187
|
subtitlesId?: string | undefined;
|
|
@@ -28,6 +28,7 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
28
28
|
}[];
|
|
29
29
|
effects: any[];
|
|
30
30
|
isVisible: boolean;
|
|
31
|
+
name?: string | undefined;
|
|
31
32
|
mediaDataId?: string | undefined;
|
|
32
33
|
subtitlesId?: string | undefined;
|
|
33
34
|
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
@@ -36,6 +36,7 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
36
36
|
}[];
|
|
37
37
|
effects: any[];
|
|
38
38
|
isVisible: boolean;
|
|
39
|
+
name?: string | undefined;
|
|
39
40
|
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
40
41
|
mediaDataId?: string | undefined;
|
|
41
42
|
subtitlesId?: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as PIXI from "pixi.js";
|
|
2
2
|
import { ExportOptions } from '../../../../Engine';
|
|
3
|
+
import { FilmStripStateEnum, IFilmstripData } from '../../../../index';
|
|
3
4
|
import { Clip, ClipOptions } from "../../Clip";
|
|
4
5
|
import { ClipStyle } from "../../ClipStyle";
|
|
5
6
|
export interface VideoClipOptions extends ClipOptions<ClipStyle> {
|
|
@@ -74,6 +75,35 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
74
75
|
* @returns An array of Float32Array representing the audio samples, or null if the media data is unavailable.
|
|
75
76
|
*/
|
|
76
77
|
getAudioSamples(startTime: number, duration?: number): Float32Array[] | null;
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves the current state of the filmstrip extraction process for the associated media data.
|
|
80
|
+
*
|
|
81
|
+
* @return {FilmStripStateEnum} The current state of the filmstrip extraction process.
|
|
82
|
+
* It can be one of the following values:
|
|
83
|
+
* - `FilmStripStateEnum.NONE`: No filmstrip extraction process is currently running.
|
|
84
|
+
* - `FilmStripStateEnum.PARTIAL`: The filmstrip extraction process is partially complete.
|
|
85
|
+
* - `FilmStripStateEnum.DONE`: The filmstrip extraction process is complete.
|
|
86
|
+
* - `FilmStripStateEnum.ERROR`: An error occurred during the filmstrip extraction process.
|
|
87
|
+
*/
|
|
88
|
+
getFilmstripState(): FilmStripStateEnum;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves the data for the filmstrip associated with this clip.
|
|
91
|
+
*
|
|
92
|
+
* @return {IFilmstripData[]} An array of IFilmstripData objects representing the filmstrip data.
|
|
93
|
+
* If the clip is not associated with any media data or the media data does not have a filmstrip,
|
|
94
|
+
* an empty array is returned.
|
|
95
|
+
*/
|
|
96
|
+
getFilmstripData(): IFilmstripData[];
|
|
97
|
+
/**
|
|
98
|
+
* Retrieves a range of data from the filmstrip associated with this clip.
|
|
99
|
+
*
|
|
100
|
+
* @param {number} start - The start time of the range in seconds, in case it lands between two filmstrip data points returns the lowest.
|
|
101
|
+
* @param {number} end - The end time of the range in seconds, in case it lands between two filmstrip data points returns the highest.
|
|
102
|
+
* @return {IFilmstripData[]} An array of IFilmstripData objects representing the filmstrip data in the specified range.
|
|
103
|
+
* If the clip is not associated with any media data or the media data does not have a filmstrip,
|
|
104
|
+
* or if the range is invalid, an empty array is returned.
|
|
105
|
+
*/
|
|
106
|
+
getFilmstripDataRange(start: number, end: number): IFilmstripData[];
|
|
77
107
|
extractMonoAudioData(startTime: number, endTime: number): Promise<Float32Array | null>;
|
|
78
108
|
destroy(): void;
|
|
79
109
|
clone(): VideoClip;
|
|
@@ -96,9 +126,10 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
96
126
|
effects: any[];
|
|
97
127
|
isVisible: boolean;
|
|
98
128
|
text?: string | undefined;
|
|
99
|
-
|
|
129
|
+
name?: string | undefined;
|
|
130
|
+
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
100
131
|
subtitlesId?: string | undefined;
|
|
101
|
-
blendMode?: import('../../../../
|
|
132
|
+
blendMode?: import('../../../../index').BlendModeEnum | undefined;
|
|
102
133
|
style?: unknown;
|
|
103
134
|
animationController?: {
|
|
104
135
|
animationInDuration: number;
|
|
@@ -107,17 +138,17 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
107
138
|
loopSmoothing: number;
|
|
108
139
|
animationDataIn?: {
|
|
109
140
|
name: string;
|
|
110
|
-
inOutOfRange: import(
|
|
111
|
-
outOutOfRange: import(
|
|
141
|
+
inOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
142
|
+
outOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
112
143
|
propertyAnimations: {
|
|
113
|
-
inOutOfRange: import(
|
|
114
|
-
outOutOfRange: import(
|
|
144
|
+
inOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
145
|
+
outOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
115
146
|
property: string;
|
|
116
147
|
keyframes: {
|
|
117
148
|
value: string | number;
|
|
118
149
|
time: number;
|
|
119
|
-
easing: import(
|
|
120
|
-
space: import(
|
|
150
|
+
easing: import('../../../../index').EasingEnum;
|
|
151
|
+
space: import('../../../../index').AnimationSpaceEnum;
|
|
121
152
|
relativeProperty?: string | undefined;
|
|
122
153
|
}[];
|
|
123
154
|
}[];
|
|
@@ -127,17 +158,17 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
127
158
|
} | undefined;
|
|
128
159
|
animationDataOut?: {
|
|
129
160
|
name: string;
|
|
130
|
-
inOutOfRange: import(
|
|
131
|
-
outOutOfRange: import(
|
|
161
|
+
inOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
162
|
+
outOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
132
163
|
propertyAnimations: {
|
|
133
|
-
inOutOfRange: import(
|
|
134
|
-
outOutOfRange: import(
|
|
164
|
+
inOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
165
|
+
outOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
135
166
|
property: string;
|
|
136
167
|
keyframes: {
|
|
137
168
|
value: string | number;
|
|
138
169
|
time: number;
|
|
139
|
-
easing: import(
|
|
140
|
-
space: import(
|
|
170
|
+
easing: import('../../../../index').EasingEnum;
|
|
171
|
+
space: import('../../../../index').AnimationSpaceEnum;
|
|
141
172
|
relativeProperty?: string | undefined;
|
|
142
173
|
}[];
|
|
143
174
|
}[];
|
|
@@ -147,17 +178,17 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
147
178
|
} | undefined;
|
|
148
179
|
animationDataLoop?: {
|
|
149
180
|
name: string;
|
|
150
|
-
inOutOfRange: import(
|
|
151
|
-
outOutOfRange: import(
|
|
181
|
+
inOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
182
|
+
outOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
152
183
|
propertyAnimations: {
|
|
153
|
-
inOutOfRange: import(
|
|
154
|
-
outOutOfRange: import(
|
|
184
|
+
inOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
185
|
+
outOutOfRange: import('../../../../index').OutOfRangeEnum;
|
|
155
186
|
property: string;
|
|
156
187
|
keyframes: {
|
|
157
188
|
value: string | number;
|
|
158
189
|
time: number;
|
|
159
|
-
easing: import(
|
|
160
|
-
space: import(
|
|
190
|
+
easing: import('../../../../index').EasingEnum;
|
|
191
|
+
space: import('../../../../index').AnimationSpaceEnum;
|
|
161
192
|
relativeProperty?: string | undefined;
|
|
162
193
|
}[];
|
|
163
194
|
}[];
|
|
@@ -168,7 +199,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
168
199
|
} | undefined;
|
|
169
200
|
customData?: [string, unknown][] | undefined;
|
|
170
201
|
clipMasks?: {
|
|
171
|
-
wrapMode: import(
|
|
202
|
+
wrapMode: import('../../../../index').MaskWrapModeEnum;
|
|
172
203
|
id: string;
|
|
173
204
|
clipId: string;
|
|
174
205
|
}[] | undefined;
|
|
@@ -34,6 +34,8 @@ export declare enum EventsEnum {
|
|
|
34
34
|
LIBRARY_REPLACED = "library:replaced",
|
|
35
35
|
LIBRARY_ERROR = "library:error",
|
|
36
36
|
LIBRARY_MEDIA_UPDATED = "library:media:updated",
|
|
37
|
+
LIBRARY_MEDIA_SAMPLES_UPDATED = "library:media:samples:updated",
|
|
38
|
+
LIBRARY_MEDIA_FILMSTRIP_UPDATED = "library:media:filmstrip:updated",
|
|
37
39
|
LIBRARY_PROGRESS = "library:progress",
|
|
38
40
|
LIBRARY_EFFECT_ADDED = "library:effect:added",// To Libary
|
|
39
41
|
LIBRARY_EFFECT_REMOVED = "library:effect:removed",// From Library
|
|
@@ -184,6 +186,12 @@ export type EventPayloadMap = {
|
|
|
184
186
|
mediaDataId: string;
|
|
185
187
|
status: string;
|
|
186
188
|
};
|
|
189
|
+
[EventsEnum.LIBRARY_MEDIA_SAMPLES_UPDATED]: {
|
|
190
|
+
mediaDataId: string;
|
|
191
|
+
};
|
|
192
|
+
[EventsEnum.LIBRARY_MEDIA_FILMSTRIP_UPDATED]: {
|
|
193
|
+
mediaDataId: string;
|
|
194
|
+
};
|
|
187
195
|
[EventsEnum.LIBRARY_PROGRESS]: {
|
|
188
196
|
mediaDataId: string;
|
|
189
197
|
status: string;
|
|
@@ -9,6 +9,8 @@ declare class FFmpeg {
|
|
|
9
9
|
static getInstance(): FFmpeg;
|
|
10
10
|
initialize(config: FFMessageLoadConfig): Promise<boolean | undefined>;
|
|
11
11
|
getFFmpeg(): RootFFmpeg;
|
|
12
|
+
getCoreURL(): string;
|
|
13
|
+
getWasmURL(): string;
|
|
12
14
|
createCustomInstance(): Promise<RootFFmpeg | null>;
|
|
13
15
|
reload(): Promise<void>;
|
|
14
16
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MediaInfo } from "../ffmpeg/types/FFmpeg.types";
|
|
2
|
+
import { IFilmstripData } from "../library/MediaData";
|
|
3
|
+
export declare enum FilmstripExtractorEventTypeEnum {
|
|
4
|
+
OUTPUT = "output",
|
|
5
|
+
ERROR = "error"
|
|
6
|
+
}
|
|
7
|
+
type EventPayloadMap = {
|
|
8
|
+
[FilmstripExtractorEventTypeEnum.OUTPUT]: IFilmstripData | null;
|
|
9
|
+
[FilmstripExtractorEventTypeEnum.ERROR]: string | null;
|
|
10
|
+
};
|
|
11
|
+
type EventMap = {
|
|
12
|
+
[K in FilmstripExtractorEventTypeEnum]: (payload: EventPayloadMap[K]) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare class FilmstripExtractor {
|
|
15
|
+
private worker;
|
|
16
|
+
private listeners;
|
|
17
|
+
private done;
|
|
18
|
+
private _startTime;
|
|
19
|
+
constructor();
|
|
20
|
+
private createWorker;
|
|
21
|
+
private destroyWorker;
|
|
22
|
+
init(blobUrl: string, metadata: MediaInfo): Promise<void>;
|
|
23
|
+
process(): void;
|
|
24
|
+
isDone(): boolean;
|
|
25
|
+
addEventListener<K extends FilmstripExtractorEventTypeEnum>(type: K, callback: EventMap[K]): void;
|
|
26
|
+
removeEventListener<K extends FilmstripExtractorEventTypeEnum>(type: K, callback: (payload: EventPayloadMap[K]) => void): void;
|
|
27
|
+
private emit;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum FilmstripExtractorMsgTypeEnum {
|
|
2
|
+
LOAD = "LOAD",
|
|
3
|
+
INIT = "INIT",
|
|
4
|
+
PROCESS = "PROCESS",
|
|
5
|
+
SHUTDOWN = "SHUTDOWN",
|
|
6
|
+
OUTPUT = "OUTPUT",
|
|
7
|
+
ERROR = "ERROR"
|
|
8
|
+
}
|
|
9
|
+
export interface IFilmstripExtractorMsg {
|
|
10
|
+
type: FilmstripExtractorMsgTypeEnum;
|
|
11
|
+
payload: any;
|
|
12
|
+
}
|
|
13
|
+
export interface IFilmstripExtractorPayloadLoad {
|
|
14
|
+
coreURL: string;
|
|
15
|
+
wasmURL: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IFilmstripExtractorPayloadOutput {
|
|
18
|
+
data: Uint8Array;
|
|
19
|
+
timestamp: number;
|
|
20
|
+
}
|
|
21
|
+
export interface IFilmstripExtractorPayloadInit {
|
|
22
|
+
blobUrl: string;
|
|
23
|
+
codec: string;
|
|
24
|
+
displayWidth: number;
|
|
25
|
+
displayHeight: number;
|
|
26
|
+
codedWidth: number;
|
|
27
|
+
codedHeight: number;
|
|
28
|
+
extradata: Uint8Array | undefined;
|
|
29
|
+
hopSize: number;
|
|
30
|
+
keyframesOnly: boolean;
|
|
31
|
+
rotation: number;
|
|
32
|
+
filmstripWidth: number;
|
|
33
|
+
filmstripHeight: number;
|
|
34
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
17
17
|
media: z.ZodArray<z.ZodObject<{
|
|
18
18
|
id: z.ZodString;
|
|
19
19
|
type: z.ZodString;
|
|
20
|
+
name: z.ZodOptional<z.ZodString>;
|
|
20
21
|
filename: z.ZodString;
|
|
21
22
|
permanentUrl: z.ZodOptional<z.ZodString>;
|
|
22
23
|
hash: z.ZodOptional<z.ZodString>;
|
|
@@ -27,6 +28,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
27
28
|
type: string;
|
|
28
29
|
id: string;
|
|
29
30
|
filename: string;
|
|
31
|
+
name?: string | undefined;
|
|
30
32
|
permanentUrl?: string | undefined;
|
|
31
33
|
hash?: string | undefined;
|
|
32
34
|
mimeType?: string | undefined;
|
|
@@ -36,6 +38,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
36
38
|
type: string;
|
|
37
39
|
id: string;
|
|
38
40
|
filename: string;
|
|
41
|
+
name?: string | undefined;
|
|
39
42
|
permanentUrl?: string | undefined;
|
|
40
43
|
hash?: string | undefined;
|
|
41
44
|
mimeType?: string | undefined;
|
|
@@ -319,6 +322,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
319
322
|
type: string;
|
|
320
323
|
id: string;
|
|
321
324
|
filename: string;
|
|
325
|
+
name?: string | undefined;
|
|
322
326
|
permanentUrl?: string | undefined;
|
|
323
327
|
hash?: string | undefined;
|
|
324
328
|
mimeType?: string | undefined;
|
|
@@ -386,6 +390,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
386
390
|
type: string;
|
|
387
391
|
id: string;
|
|
388
392
|
filename: string;
|
|
393
|
+
name?: string | undefined;
|
|
389
394
|
permanentUrl?: string | undefined;
|
|
390
395
|
hash?: string | undefined;
|
|
391
396
|
mimeType?: string | undefined;
|
|
@@ -400,12 +405,14 @@ export declare class Library {
|
|
|
400
405
|
filters: Record<string, FilterData>;
|
|
401
406
|
transitions: Record<string, TransitionData>;
|
|
402
407
|
builtInEffects: Record<string, EffectData>;
|
|
408
|
+
private filmstripWorkers;
|
|
409
|
+
private filmstripQueue;
|
|
403
410
|
constructor();
|
|
404
411
|
init(): Promise<void>;
|
|
405
412
|
destroy(): Promise<void>;
|
|
406
413
|
createBuiltInEffects(): Promise<void>;
|
|
407
414
|
getMediaById(id: string): MediaData | undefined;
|
|
408
|
-
addMedia(source: File | string | Uint8Array, mimeType?: string): Promise<string | null>;
|
|
415
|
+
addMedia(source: File | string | Uint8Array, mimeType?: string, filename?: string): Promise<string | null>;
|
|
409
416
|
addSerializedMedia(data: any): Promise<string>;
|
|
410
417
|
deleteMedia(id: string): Promise<void>;
|
|
411
418
|
/**
|
|
@@ -428,6 +435,10 @@ export declare class Library {
|
|
|
428
435
|
syncAllMedia(): Promise<void>;
|
|
429
436
|
replaceMedia(id: string, file: File | string | Uint8Array, mimeType?: string): Promise<boolean>;
|
|
430
437
|
replaceSerializedMedia(data: any): Promise<boolean>;
|
|
438
|
+
extractAudioFromMedia(mediaId: string): Promise<string | null>;
|
|
439
|
+
private onFilmstripFrame;
|
|
440
|
+
private processNextFilmstrip;
|
|
441
|
+
createFilmstripWorker(mediaId: string): Promise<void>;
|
|
431
442
|
addEffect(options: EffectDataOptions): Promise<string>;
|
|
432
443
|
removeEffect(id: string): void;
|
|
433
444
|
getEffectById(id: string): EffectData | undefined;
|
|
@@ -514,6 +525,7 @@ export declare class Library {
|
|
|
514
525
|
type: string;
|
|
515
526
|
id: string;
|
|
516
527
|
filename: string;
|
|
528
|
+
name?: string | undefined;
|
|
517
529
|
permanentUrl?: string | undefined;
|
|
518
530
|
hash?: string | undefined;
|
|
519
531
|
mimeType?: string | undefined;
|
|
@@ -3,6 +3,7 @@ import { MediaInfo } from "../ffmpeg/types/FFmpeg.types";
|
|
|
3
3
|
export declare const MediaDataSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
type: z.ZodString;
|
|
6
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
7
|
filename: z.ZodString;
|
|
7
8
|
permanentUrl: z.ZodOptional<z.ZodString>;
|
|
8
9
|
hash: z.ZodOptional<z.ZodString>;
|
|
@@ -13,6 +14,7 @@ export declare const MediaDataSchema: z.ZodObject<{
|
|
|
13
14
|
type: string;
|
|
14
15
|
id: string;
|
|
15
16
|
filename: string;
|
|
17
|
+
name?: string | undefined;
|
|
16
18
|
permanentUrl?: string | undefined;
|
|
17
19
|
hash?: string | undefined;
|
|
18
20
|
mimeType?: string | undefined;
|
|
@@ -22,27 +24,41 @@ export declare const MediaDataSchema: z.ZodObject<{
|
|
|
22
24
|
type: string;
|
|
23
25
|
id: string;
|
|
24
26
|
filename: string;
|
|
27
|
+
name?: string | undefined;
|
|
25
28
|
permanentUrl?: string | undefined;
|
|
26
29
|
hash?: string | undefined;
|
|
27
30
|
mimeType?: string | undefined;
|
|
28
31
|
customData?: [string, unknown][] | undefined;
|
|
29
32
|
placeholderClipIds?: string[] | undefined;
|
|
30
33
|
}>;
|
|
34
|
+
export interface IFilmstripData {
|
|
35
|
+
data: Uint8Array;
|
|
36
|
+
timestamp: number;
|
|
37
|
+
}
|
|
38
|
+
export declare enum FilmStripStateEnum {
|
|
39
|
+
NONE = "none",
|
|
40
|
+
PARTIAL = "partial",
|
|
41
|
+
DONE = "done",
|
|
42
|
+
ERROR = "error"
|
|
43
|
+
}
|
|
31
44
|
export declare enum MediaDataStatus {
|
|
32
45
|
NONE = "none",
|
|
33
46
|
ERROR = "error",
|
|
34
47
|
LOADING = "loading",
|
|
35
48
|
TRANSCODING = "transcoding",
|
|
49
|
+
/** @deprecated Use MediaData::filmstripState instead */
|
|
36
50
|
FILMSTRIP = "filmstrip",
|
|
37
51
|
READY = "ready",
|
|
38
52
|
DESTROYED = "destroyed"
|
|
39
53
|
}
|
|
40
54
|
export declare class MediaData {
|
|
41
55
|
private id;
|
|
42
|
-
status
|
|
56
|
+
status: MediaDataStatus;
|
|
43
57
|
thumbnail?: string;
|
|
58
|
+
/** This is an url for a filmstrip placeholder */
|
|
44
59
|
filmstrip?: string;
|
|
45
60
|
type: string;
|
|
61
|
+
private name;
|
|
46
62
|
filename: string;
|
|
47
63
|
width?: number;
|
|
48
64
|
height?: number;
|
|
@@ -57,7 +73,9 @@ export declare class MediaData {
|
|
|
57
73
|
mimeType?: string;
|
|
58
74
|
customData?: Map<string, unknown>;
|
|
59
75
|
placeholderClipIds: string[];
|
|
60
|
-
sampleData
|
|
76
|
+
private sampleData;
|
|
77
|
+
private filmstripData;
|
|
78
|
+
private filmstripState;
|
|
61
79
|
audioSplit?: string;
|
|
62
80
|
private static lockMediaInfo;
|
|
63
81
|
private waitForMediaInfoUnlock;
|
|
@@ -66,12 +84,22 @@ export declare class MediaData {
|
|
|
66
84
|
init(): Promise<void>;
|
|
67
85
|
destroy(): Promise<void>;
|
|
68
86
|
getId(): string;
|
|
87
|
+
getName(): string;
|
|
88
|
+
hasName(): boolean;
|
|
89
|
+
setName(name: string): void;
|
|
69
90
|
store(): Promise<void>;
|
|
70
91
|
restore(): Promise<boolean>;
|
|
71
92
|
addPlaceholderClip(clipId: string): Promise<void>;
|
|
72
93
|
getPlaceholderClips(): ReadonlyArray<string>;
|
|
73
94
|
removePlaceholderClip(clipId: string): void;
|
|
74
95
|
removeAllPlaceholderClips(): void;
|
|
96
|
+
prepareFilmstrip(): void;
|
|
97
|
+
setFilmstripState(state: FilmStripStateEnum): void;
|
|
98
|
+
addFilmstripFrame(filmstripData: IFilmstripData | null): void;
|
|
99
|
+
private extractFilmstrip;
|
|
100
|
+
getFilmstripState(): FilmStripStateEnum;
|
|
101
|
+
getFilmstripData(): IFilmstripData[];
|
|
102
|
+
getFilmstripDataRange(start: number, end: number): IFilmstripData[];
|
|
75
103
|
private resampleLinear;
|
|
76
104
|
private extractAudioSamples;
|
|
77
105
|
getAudioSamples(startTime: number, duration?: number): Float32Array[] | null;
|
|
@@ -121,7 +149,7 @@ export declare class MediaData {
|
|
|
121
149
|
filePath?: undefined;
|
|
122
150
|
mimeType?: undefined;
|
|
123
151
|
}>;
|
|
124
|
-
load(file: File | string | Uint8Array, mimeType?: string): Promise<void>;
|
|
152
|
+
load(file: File | string | Uint8Array, mimeType?: string, filename?: string): Promise<void>;
|
|
125
153
|
setPermanentUrl(url: string | null): void;
|
|
126
154
|
getHash(): string | undefined;
|
|
127
155
|
waitForStatus(status: MediaDataStatus, checkIntervalMS?: number, timeoutMS?: number): Promise<boolean>;
|
|
@@ -129,6 +157,7 @@ export declare class MediaData {
|
|
|
129
157
|
type: string;
|
|
130
158
|
id: string;
|
|
131
159
|
filename: string;
|
|
160
|
+
name?: string | undefined;
|
|
132
161
|
permanentUrl?: string | undefined;
|
|
133
162
|
hash?: string | undefined;
|
|
134
163
|
mimeType?: string | undefined;
|
|
@@ -29,6 +29,13 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
29
29
|
clipAudioSampleRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
30
30
|
clipAudioSampleForceMono: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
31
31
|
clipVideoStoreSamples: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
32
|
+
clipVideoStoreFilmstrip: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
33
|
+
clipVideoFilmstripInterval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
34
|
+
clipVideoFilmstripMaxFrames: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
clipVideoFilmstripMaxHeight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
36
|
+
clipVideoFilmstripMaxWidth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
37
|
+
clipVideoFilmstripMaxWorkers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
38
|
+
clipVideoFilmstripKeyframesOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
32
39
|
renderShowPreview: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
33
40
|
renderMaxQueueSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
34
41
|
renderThrottleFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -56,6 +63,13 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
56
63
|
clipAudioSampleRate: number;
|
|
57
64
|
clipAudioSampleForceMono: boolean;
|
|
58
65
|
clipVideoStoreSamples: boolean;
|
|
66
|
+
clipVideoStoreFilmstrip: boolean;
|
|
67
|
+
clipVideoFilmstripInterval: number;
|
|
68
|
+
clipVideoFilmstripMaxFrames: number;
|
|
69
|
+
clipVideoFilmstripMaxHeight: number;
|
|
70
|
+
clipVideoFilmstripMaxWidth: number;
|
|
71
|
+
clipVideoFilmstripMaxWorkers: number;
|
|
72
|
+
clipVideoFilmstripKeyframesOnly: boolean;
|
|
59
73
|
renderShowPreview: boolean;
|
|
60
74
|
renderMaxQueueSize: number;
|
|
61
75
|
renderThrottleFactor: number;
|
|
@@ -83,6 +97,13 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
83
97
|
clipAudioSampleRate?: number | undefined;
|
|
84
98
|
clipAudioSampleForceMono?: boolean | undefined;
|
|
85
99
|
clipVideoStoreSamples?: boolean | undefined;
|
|
100
|
+
clipVideoStoreFilmstrip?: boolean | undefined;
|
|
101
|
+
clipVideoFilmstripInterval?: number | undefined;
|
|
102
|
+
clipVideoFilmstripMaxFrames?: number | undefined;
|
|
103
|
+
clipVideoFilmstripMaxHeight?: number | undefined;
|
|
104
|
+
clipVideoFilmstripMaxWidth?: number | undefined;
|
|
105
|
+
clipVideoFilmstripMaxWorkers?: number | undefined;
|
|
106
|
+
clipVideoFilmstripKeyframesOnly?: boolean | undefined;
|
|
86
107
|
renderShowPreview?: boolean | undefined;
|
|
87
108
|
renderMaxQueueSize?: number | undefined;
|
|
88
109
|
renderThrottleFactor?: number | undefined;
|
|
@@ -111,6 +132,13 @@ export declare class Settings {
|
|
|
111
132
|
private clipAudioSampleRate;
|
|
112
133
|
private clipAudioSampleForceMono;
|
|
113
134
|
private clipVideoStoreSamples;
|
|
135
|
+
private clipVideoStoreFilmstrip;
|
|
136
|
+
private clipVideoFilmstripInterval;
|
|
137
|
+
private clipVideoFilmstripMaxFrames;
|
|
138
|
+
private clipVideoFilmstripMaxHeight;
|
|
139
|
+
private clipVideoFilmstripMaxWidth;
|
|
140
|
+
private clipVideoFilmstripMaxWorkers;
|
|
141
|
+
private clipVideoFilmstripKeyframesOnly;
|
|
114
142
|
private decoderUseWebCodecs;
|
|
115
143
|
private decoderPreferredAcceleration;
|
|
116
144
|
private encoderCodec;
|
|
@@ -140,6 +168,13 @@ export declare class Settings {
|
|
|
140
168
|
clipAudioSampleRate: number;
|
|
141
169
|
clipAudioSampleForceMono: boolean;
|
|
142
170
|
clipVideoStoreSamples: boolean;
|
|
171
|
+
clipVideoStoreFilmstrip: boolean;
|
|
172
|
+
clipVideoFilmstripInterval: number;
|
|
173
|
+
clipVideoFilmstripMaxFrames: number;
|
|
174
|
+
clipVideoFilmstripMaxHeight: number;
|
|
175
|
+
clipVideoFilmstripMaxWidth: number;
|
|
176
|
+
clipVideoFilmstripMaxWorkers: number;
|
|
177
|
+
clipVideoFilmstripKeyframesOnly: boolean;
|
|
143
178
|
renderShowPreview: boolean;
|
|
144
179
|
renderMaxQueueSize: number;
|
|
145
180
|
renderThrottleFactor: number;
|
|
@@ -170,6 +205,20 @@ export declare class Settings {
|
|
|
170
205
|
getClipAudioSampleForceMono(): boolean;
|
|
171
206
|
setClipVideoStoreSamples(storeSamples: boolean): void;
|
|
172
207
|
getClipVideoStoreSamples(): boolean;
|
|
208
|
+
setClipVideoStoreFilmstrip(storeFilmstrip: boolean): void;
|
|
209
|
+
getClipVideoStoreFilmstrip(): boolean;
|
|
210
|
+
setClipVideoFilmstripInterval(interval: number): void;
|
|
211
|
+
getClipVideoFilmstripInterval(): number;
|
|
212
|
+
setClipVideoFilmstripMaxFrames(maxFrames: number): void;
|
|
213
|
+
getClipVideoFilmstripMaxFrames(): number;
|
|
214
|
+
setClipVideoFilmstripMaxHeight(maxHeight: number): void;
|
|
215
|
+
getClipVideoFilmstripMaxHeight(): number;
|
|
216
|
+
setClipVideoFilmstripMaxWidth(maxWidth: number): void;
|
|
217
|
+
getClipVideoFilmstripMaxWidth(): number;
|
|
218
|
+
setClipVideoFilmstripMaxWorkers(maxWorkers: number): void;
|
|
219
|
+
getClipVideoFilmstripMaxWorkers(): number;
|
|
220
|
+
setClipVideoFilmstripKeyframesOnly(keyframesOnly: boolean): void;
|
|
221
|
+
getClipVideoFilmstripKeyframesOnly(): boolean;
|
|
173
222
|
setEncoderCrf(crf: number): void;
|
|
174
223
|
getEncoderCrf(): number;
|
|
175
224
|
setEncoderDeadline(deadline: number): void;
|
|
@@ -232,6 +281,13 @@ export declare class Settings {
|
|
|
232
281
|
clipAudioSampleRate: number;
|
|
233
282
|
clipAudioSampleForceMono: boolean;
|
|
234
283
|
clipVideoStoreSamples: boolean;
|
|
284
|
+
clipVideoStoreFilmstrip: boolean;
|
|
285
|
+
clipVideoFilmstripInterval: number;
|
|
286
|
+
clipVideoFilmstripMaxFrames: number;
|
|
287
|
+
clipVideoFilmstripMaxHeight: number;
|
|
288
|
+
clipVideoFilmstripMaxWidth: number;
|
|
289
|
+
clipVideoFilmstripMaxWorkers: number;
|
|
290
|
+
clipVideoFilmstripKeyframesOnly: boolean;
|
|
235
291
|
renderShowPreview: boolean;
|
|
236
292
|
renderMaxQueueSize: number;
|
|
237
293
|
renderThrottleFactor: number;
|