@rendley/sdk 1.0.2 → 1.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/Engine.d.ts +5 -7
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/clip/Clip.d.ts +1 -11
- package/dist/modules/clip/ClipStyle.d.ts +12 -6
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +1 -1
- package/dist/modules/clip/clips/gif/GifClip.d.ts +1 -1
- package/dist/modules/clip/clips/image/ImageClip.d.ts +1 -1
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +50 -0
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +1 -3
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +1 -1
- package/dist/modules/clip/clips/text/TextClip.d.ts +0 -2
- package/dist/modules/clip/clips/text/TextStyle.d.ts +1 -1
- package/dist/modules/clip/clips/video/VideoClip.d.ts +1 -1
- package/dist/modules/display/Display.d.ts +6 -6
- package/dist/modules/filter/Effect.d.ts +0 -1
- package/dist/modules/filter/Filter.d.ts +0 -4
- package/dist/modules/layer/Layer.d.ts +4 -18
- package/dist/modules/library/MediaData.d.ts +22 -0
- package/dist/modules/library/index.d.ts +2 -0
- package/dist/modules/timeline/Timeline.d.ts +1 -19
- package/dist/types/clip.types.d.ts +1 -0
- package/dist/utils/dom/recreateDomCanvas.d.ts +1 -0
- package/package.json +13 -8
|
@@ -23,7 +23,6 @@ export interface ClipOptions<K extends ClipStyle = ClipStyle> {
|
|
|
23
23
|
style?: Partial<ReturnType<K["serialize"]>>;
|
|
24
24
|
}
|
|
25
25
|
export declare const ClipSchema: z.ZodObject<{
|
|
26
|
-
name: z.ZodString;
|
|
27
26
|
id: z.ZodString;
|
|
28
27
|
type: z.ZodString;
|
|
29
28
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
@@ -35,7 +34,6 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
35
34
|
rightTrim: z.ZodNumber;
|
|
36
35
|
filters: z.ZodArray<z.ZodObject<{
|
|
37
36
|
id: z.ZodString;
|
|
38
|
-
name: z.ZodString;
|
|
39
37
|
sourceId: z.ZodString;
|
|
40
38
|
options: z.ZodObject<{
|
|
41
39
|
lutUrl: z.ZodString;
|
|
@@ -45,14 +43,12 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
45
43
|
lutUrl: string;
|
|
46
44
|
}>;
|
|
47
45
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
name: string;
|
|
49
46
|
options: {
|
|
50
47
|
lutUrl: string;
|
|
51
48
|
};
|
|
52
49
|
id: string;
|
|
53
50
|
sourceId: string;
|
|
54
51
|
}, {
|
|
55
|
-
name: string;
|
|
56
52
|
options: {
|
|
57
53
|
lutUrl: string;
|
|
58
54
|
};
|
|
@@ -64,12 +60,10 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
64
60
|
style: z.ZodUnknown;
|
|
65
61
|
text: z.ZodOptional<z.ZodString>;
|
|
66
62
|
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
name: string;
|
|
68
63
|
type: string;
|
|
69
64
|
id: string;
|
|
70
65
|
duration: number;
|
|
71
66
|
filters: {
|
|
72
|
-
name: string;
|
|
73
67
|
options: {
|
|
74
68
|
lutUrl: string;
|
|
75
69
|
};
|
|
@@ -87,12 +81,10 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
87
81
|
style?: unknown;
|
|
88
82
|
text?: string | undefined;
|
|
89
83
|
}, {
|
|
90
|
-
name: string;
|
|
91
84
|
type: string;
|
|
92
85
|
id: string;
|
|
93
86
|
duration: number;
|
|
94
87
|
filters: {
|
|
95
|
-
name: string;
|
|
96
88
|
options: {
|
|
97
89
|
lutUrl: string;
|
|
98
90
|
};
|
|
@@ -129,7 +121,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
129
121
|
style: K;
|
|
130
122
|
state: ClipState;
|
|
131
123
|
constructor(options: ClipOptions<K>);
|
|
132
|
-
init(layerId: string): void
|
|
124
|
+
init(layerId: string): Promise<void>;
|
|
133
125
|
isReady(): boolean;
|
|
134
126
|
getStartTime(): number;
|
|
135
127
|
getEndTime(): number;
|
|
@@ -180,12 +172,10 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
180
172
|
clone(): Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>;
|
|
181
173
|
protected updateTexture(pixels: Uint8Array, width: number, height: number): void;
|
|
182
174
|
serialize(): {
|
|
183
|
-
name: string;
|
|
184
175
|
type: string;
|
|
185
176
|
id: string;
|
|
186
177
|
duration: number;
|
|
187
178
|
filters: {
|
|
188
|
-
name: string;
|
|
189
179
|
options: {
|
|
190
180
|
lutUrl: string;
|
|
191
181
|
};
|
|
@@ -10,9 +10,9 @@ export interface ClipStyleOptions {
|
|
|
10
10
|
zIndex?: number;
|
|
11
11
|
width?: number;
|
|
12
12
|
height?: number;
|
|
13
|
+
cornerRadius?: number;
|
|
13
14
|
}
|
|
14
15
|
export declare const schema: z.ZodObject<{
|
|
15
|
-
name: z.ZodString;
|
|
16
16
|
clipId: z.ZodString;
|
|
17
17
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
18
18
|
alpha: z.ZodNumber;
|
|
@@ -22,8 +22,8 @@ export declare const schema: z.ZodObject<{
|
|
|
22
22
|
zIndex: z.ZodNumber;
|
|
23
23
|
width: z.ZodOptional<z.ZodNumber>;
|
|
24
24
|
height: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
cornerRadius: z.ZodOptional<z.ZodNumber>;
|
|
25
26
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
name: string;
|
|
27
27
|
clipId: string;
|
|
28
28
|
alpha: number;
|
|
29
29
|
rotation: number;
|
|
@@ -33,8 +33,8 @@ export declare const schema: z.ZodObject<{
|
|
|
33
33
|
mediaDataId?: string | undefined;
|
|
34
34
|
width?: number | undefined;
|
|
35
35
|
height?: number | undefined;
|
|
36
|
+
cornerRadius?: number | undefined;
|
|
36
37
|
}, {
|
|
37
|
-
name: string;
|
|
38
38
|
clipId: string;
|
|
39
39
|
alpha: number;
|
|
40
40
|
rotation: number;
|
|
@@ -44,6 +44,7 @@ export declare const schema: z.ZodObject<{
|
|
|
44
44
|
mediaDataId?: string | undefined;
|
|
45
45
|
width?: number | undefined;
|
|
46
46
|
height?: number | undefined;
|
|
47
|
+
cornerRadius?: number | undefined;
|
|
47
48
|
}>;
|
|
48
49
|
export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
49
50
|
protected alpha: number;
|
|
@@ -53,18 +54,22 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
53
54
|
protected width: number;
|
|
54
55
|
protected height: number;
|
|
55
56
|
protected scale: [number, number];
|
|
57
|
+
protected cornerRadius: number;
|
|
56
58
|
protected sprite: T | null;
|
|
57
59
|
private clipId;
|
|
58
60
|
private mediaDataId;
|
|
61
|
+
protected mask: PIXI.Graphics | null;
|
|
59
62
|
constructor(options: ClipStyleOptions);
|
|
60
63
|
private positionToCenter;
|
|
61
64
|
private scaleDownToFit;
|
|
65
|
+
setCornerRadius(radius: number): void;
|
|
66
|
+
getCornerRadius(): number;
|
|
62
67
|
setScale(scaleX: number, scaleY: number): void;
|
|
63
68
|
getScale(): [number, number];
|
|
64
|
-
setWidth(width: number): void;
|
|
65
|
-
setHeight(height: number): void;
|
|
66
69
|
getWidth(): number;
|
|
67
70
|
getHeight(): number;
|
|
71
|
+
getRawWidth(): number;
|
|
72
|
+
getRawHeight(): number;
|
|
68
73
|
setAlpha(alpha: number): void;
|
|
69
74
|
getAlpha(): number;
|
|
70
75
|
setRotation(rotation: number): void;
|
|
@@ -75,9 +80,9 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
75
80
|
getZIndex(): number;
|
|
76
81
|
load(sprite: T): void;
|
|
77
82
|
update(sprite: T): void;
|
|
83
|
+
private setCornerRadiusOnSprite;
|
|
78
84
|
protected emitUpdateEvent(property: string, value: unknown): boolean;
|
|
79
85
|
serialize(): {
|
|
80
|
-
name: string;
|
|
81
86
|
clipId: string;
|
|
82
87
|
alpha: number;
|
|
83
88
|
rotation: number;
|
|
@@ -87,6 +92,7 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
87
92
|
mediaDataId?: string | undefined;
|
|
88
93
|
width?: number | undefined;
|
|
89
94
|
height?: number | undefined;
|
|
95
|
+
cornerRadius?: number | undefined;
|
|
90
96
|
};
|
|
91
97
|
static deserialize(payload: object): ClipStyle<PIXI.Sprite>;
|
|
92
98
|
}
|
|
@@ -12,7 +12,7 @@ export declare class AudioClip extends Clip {
|
|
|
12
12
|
private lastLeftTrim;
|
|
13
13
|
private lastRightTrim;
|
|
14
14
|
constructor(options: AudioClipOptions);
|
|
15
|
-
init(layerId: string): void
|
|
15
|
+
init(layerId: string): Promise<void>;
|
|
16
16
|
private getGlobalTimeToClipTime;
|
|
17
17
|
getIsProcessing(): boolean;
|
|
18
18
|
preload(currentTime: number): void;
|
|
@@ -11,7 +11,7 @@ export declare class GifClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
|
|
|
11
11
|
private lastRightTrim;
|
|
12
12
|
private gifAnimator;
|
|
13
13
|
constructor(options: GifClipOptions);
|
|
14
|
-
init(layerId: string): void
|
|
14
|
+
init(layerId: string): Promise<void>;
|
|
15
15
|
private getGlobalTimeToClipTime;
|
|
16
16
|
preload(currentTime: number): void;
|
|
17
17
|
private play;
|
|
@@ -6,7 +6,7 @@ export interface ImageClipOptions extends ClipOptions<ClipStyle> {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class ImageClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
|
|
8
8
|
constructor(options: ImageClipOptions);
|
|
9
|
-
init(layerId: string): void
|
|
9
|
+
init(layerId: string): Promise<void>;
|
|
10
10
|
preload(currentTime: number): void;
|
|
11
11
|
updateVisibility(currentTime: number): void;
|
|
12
12
|
update(currentTime: number): void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
3
|
+
import { ClipStyle } from "../../ClipStyle";
|
|
4
|
+
export interface LottieClipOptions extends ClipOptions<ClipStyle> {
|
|
5
|
+
dataUrl: string;
|
|
6
|
+
assetsUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
|
|
9
|
+
private dataUrl;
|
|
10
|
+
private assetsUrl;
|
|
11
|
+
private animation?;
|
|
12
|
+
constructor(options: LottieClipOptions);
|
|
13
|
+
init(layerId: string): Promise<void>;
|
|
14
|
+
preload(currentTime: number): void;
|
|
15
|
+
updateVisibility(currentTime: number): void;
|
|
16
|
+
private getGlobalTimeToClipTime;
|
|
17
|
+
update(currentTime: number): void;
|
|
18
|
+
offload(): void;
|
|
19
|
+
clone(): LottieClip;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
replaceText(layerId: string | number, text: string): void;
|
|
22
|
+
private updateCachedData;
|
|
23
|
+
replaceFillColor(layerId: string | number, color: Array<number>): void;
|
|
24
|
+
replaceImage(layerId: string | number, url: string): void;
|
|
25
|
+
serialize(): {
|
|
26
|
+
type: string;
|
|
27
|
+
id: string;
|
|
28
|
+
duration: number;
|
|
29
|
+
filters: {
|
|
30
|
+
options: {
|
|
31
|
+
lutUrl: string;
|
|
32
|
+
};
|
|
33
|
+
id: string;
|
|
34
|
+
sourceId: string;
|
|
35
|
+
}[];
|
|
36
|
+
effects: unknown[];
|
|
37
|
+
subtitlesOffset: number;
|
|
38
|
+
startTime: number;
|
|
39
|
+
leftTrim: number;
|
|
40
|
+
rightTrim: number;
|
|
41
|
+
warpMode: import('../../../../types').WarmModeEnum;
|
|
42
|
+
dataUrl: string;
|
|
43
|
+
text?: string | undefined;
|
|
44
|
+
style?: unknown;
|
|
45
|
+
mediaDataId?: string | undefined;
|
|
46
|
+
subtitlesId?: string | undefined;
|
|
47
|
+
assetsUrl?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
static deserialize(payload: object): LottieClip;
|
|
50
|
+
}
|
|
@@ -15,13 +15,11 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
15
15
|
clone(): ShapeClip;
|
|
16
16
|
destroy(): void;
|
|
17
17
|
serialize(): {
|
|
18
|
-
name: string;
|
|
19
18
|
type: string;
|
|
20
19
|
id: string;
|
|
21
20
|
shape: string;
|
|
22
21
|
duration: number;
|
|
23
22
|
filters: {
|
|
24
|
-
name: string;
|
|
25
23
|
options: {
|
|
26
24
|
lutUrl: string;
|
|
27
25
|
};
|
|
@@ -33,7 +31,7 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
33
31
|
startTime: number;
|
|
34
32
|
leftTrim: number;
|
|
35
33
|
rightTrim: number;
|
|
36
|
-
warpMode: import(
|
|
34
|
+
warpMode: import('../../../../types').WarmModeEnum;
|
|
37
35
|
text?: string | undefined;
|
|
38
36
|
style?: unknown;
|
|
39
37
|
mediaDataId?: string | undefined;
|
|
@@ -10,7 +10,6 @@ export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
|
10
10
|
getColor(): string;
|
|
11
11
|
update(container: ShapeSprite): void;
|
|
12
12
|
serialize(): {
|
|
13
|
-
name: string;
|
|
14
13
|
color: string;
|
|
15
14
|
clipId: string;
|
|
16
15
|
alpha: number;
|
|
@@ -21,6 +20,7 @@ export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
|
21
20
|
width?: number | undefined;
|
|
22
21
|
height?: number | undefined;
|
|
23
22
|
mediaDataId?: string | undefined;
|
|
23
|
+
cornerRadius?: number | undefined;
|
|
24
24
|
};
|
|
25
25
|
static deserialize(payload: object): ShapeStyle;
|
|
26
26
|
}
|
|
@@ -15,13 +15,11 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
15
15
|
offload(): void;
|
|
16
16
|
clone(): TextClip;
|
|
17
17
|
serialize(): {
|
|
18
|
-
name: string;
|
|
19
18
|
text: string;
|
|
20
19
|
type: string;
|
|
21
20
|
id: string;
|
|
22
21
|
duration: number;
|
|
23
22
|
filters: {
|
|
24
|
-
name: string;
|
|
25
23
|
options: {
|
|
26
24
|
lutUrl: string;
|
|
27
25
|
};
|
|
@@ -46,7 +46,6 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
46
46
|
setRotation(rotation: number): void;
|
|
47
47
|
update(container: TextSprite): void;
|
|
48
48
|
serialize(): {
|
|
49
|
-
name: string;
|
|
50
49
|
backgroundColor: string | null;
|
|
51
50
|
color: string;
|
|
52
51
|
clipId: string;
|
|
@@ -63,6 +62,7 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
63
62
|
width?: number | undefined;
|
|
64
63
|
height?: number | undefined;
|
|
65
64
|
mediaDataId?: string | undefined;
|
|
65
|
+
cornerRadius?: number | undefined;
|
|
66
66
|
};
|
|
67
67
|
static deserialize(payload: object): TextStyle;
|
|
68
68
|
}
|
|
@@ -18,7 +18,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
18
18
|
private frameQueue;
|
|
19
19
|
private isRendering;
|
|
20
20
|
constructor(options: VideoClipOptions);
|
|
21
|
-
init(layerId: string): void
|
|
21
|
+
init(layerId: string): Promise<void>;
|
|
22
22
|
private getGlobalTimeToClipTime;
|
|
23
23
|
getIsProcessing(): boolean;
|
|
24
24
|
preload(currentTime: number): void;
|
|
@@ -13,21 +13,21 @@ export declare const DisplaySchema: z.ZodObject<{
|
|
|
13
13
|
backgroundColor: string;
|
|
14
14
|
height: number;
|
|
15
15
|
}>;
|
|
16
|
-
export type DisplayOptions = Partial<Omit<PixiRendererInitOptions, "view"
|
|
16
|
+
export type DisplayOptions = Partial<Omit<PixiRendererInitOptions, "view">> & {
|
|
17
|
+
view: HTMLCanvasElement;
|
|
18
|
+
};
|
|
17
19
|
export declare class Display {
|
|
18
20
|
private width;
|
|
19
21
|
private height;
|
|
20
22
|
private backgroundColor;
|
|
21
23
|
renderer: PixiRenderer;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
static getInstance(options?: DisplayOptions): Display;
|
|
25
|
-
init(canvas: HTMLCanvasElement): void;
|
|
26
|
-
updateInstance(options: DisplayOptions): void;
|
|
24
|
+
constructor();
|
|
25
|
+
init(options: DisplayOptions): void;
|
|
27
26
|
getWidth(): number;
|
|
28
27
|
getHeight(): number;
|
|
29
28
|
getResolution(): [number, number];
|
|
30
29
|
getBackgroundColor(): string;
|
|
30
|
+
getView(): HTMLCanvasElement;
|
|
31
31
|
setBackgroundColor(color: string): void;
|
|
32
32
|
setResolution(width: number, height: number): void;
|
|
33
33
|
getClipIdByCursorPosition(cursorX: number, cursorY: number): string | null;
|
|
@@ -2,7 +2,6 @@ import * as PIXI from "pixi.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const FilterSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
|
-
name: z.ZodString;
|
|
6
5
|
sourceId: z.ZodString;
|
|
7
6
|
options: z.ZodObject<{
|
|
8
7
|
lutUrl: z.ZodString;
|
|
@@ -12,14 +11,12 @@ export declare const FilterSchema: z.ZodObject<{
|
|
|
12
11
|
lutUrl: string;
|
|
13
12
|
}>;
|
|
14
13
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
name: string;
|
|
16
14
|
options: {
|
|
17
15
|
lutUrl: string;
|
|
18
16
|
};
|
|
19
17
|
id: string;
|
|
20
18
|
sourceId: string;
|
|
21
19
|
}, {
|
|
22
|
-
name: string;
|
|
23
20
|
options: {
|
|
24
21
|
lutUrl: string;
|
|
25
22
|
};
|
|
@@ -41,7 +38,6 @@ export declare class Filter {
|
|
|
41
38
|
getSourceId(): string;
|
|
42
39
|
getPixiFilter(): PIXI.Filter;
|
|
43
40
|
serialize(): {
|
|
44
|
-
name: string;
|
|
45
41
|
options: {
|
|
46
42
|
lutUrl: string;
|
|
47
43
|
};
|
|
@@ -11,7 +11,6 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
11
11
|
isEnabled: z.ZodBoolean;
|
|
12
12
|
isMuted: z.ZodBoolean;
|
|
13
13
|
clips: z.ZodArray<z.ZodObject<{
|
|
14
|
-
name: z.ZodString;
|
|
15
14
|
id: z.ZodString;
|
|
16
15
|
type: z.ZodString;
|
|
17
16
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
@@ -23,7 +22,6 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
23
22
|
rightTrim: z.ZodNumber;
|
|
24
23
|
filters: z.ZodArray<z.ZodObject<{
|
|
25
24
|
id: z.ZodString;
|
|
26
|
-
name: z.ZodString;
|
|
27
25
|
sourceId: z.ZodString;
|
|
28
26
|
options: z.ZodObject<{
|
|
29
27
|
lutUrl: z.ZodString;
|
|
@@ -33,14 +31,12 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
33
31
|
lutUrl: string;
|
|
34
32
|
}>;
|
|
35
33
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
name: string;
|
|
37
34
|
options: {
|
|
38
35
|
lutUrl: string;
|
|
39
36
|
};
|
|
40
37
|
id: string;
|
|
41
38
|
sourceId: string;
|
|
42
39
|
}, {
|
|
43
|
-
name: string;
|
|
44
40
|
options: {
|
|
45
41
|
lutUrl: string;
|
|
46
42
|
};
|
|
@@ -52,12 +48,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
52
48
|
style: z.ZodUnknown;
|
|
53
49
|
text: z.ZodOptional<z.ZodString>;
|
|
54
50
|
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
name: string;
|
|
56
51
|
type: string;
|
|
57
52
|
id: string;
|
|
58
53
|
duration: number;
|
|
59
54
|
filters: {
|
|
60
|
-
name: string;
|
|
61
55
|
options: {
|
|
62
56
|
lutUrl: string;
|
|
63
57
|
};
|
|
@@ -75,12 +69,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
75
69
|
style?: unknown;
|
|
76
70
|
text?: string | undefined;
|
|
77
71
|
}, {
|
|
78
|
-
name: string;
|
|
79
72
|
type: string;
|
|
80
73
|
id: string;
|
|
81
74
|
duration: number;
|
|
82
75
|
filters: {
|
|
83
|
-
name: string;
|
|
84
76
|
options: {
|
|
85
77
|
lutUrl: string;
|
|
86
78
|
};
|
|
@@ -131,12 +123,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
131
123
|
isEnabled: boolean;
|
|
132
124
|
isMuted: boolean;
|
|
133
125
|
clips: {
|
|
134
|
-
name: string;
|
|
135
126
|
type: string;
|
|
136
127
|
id: string;
|
|
137
128
|
duration: number;
|
|
138
129
|
filters: {
|
|
139
|
-
name: string;
|
|
140
130
|
options: {
|
|
141
131
|
lutUrl: string;
|
|
142
132
|
};
|
|
@@ -169,12 +159,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
169
159
|
isEnabled: boolean;
|
|
170
160
|
isMuted: boolean;
|
|
171
161
|
clips: {
|
|
172
|
-
name: string;
|
|
173
162
|
type: string;
|
|
174
163
|
id: string;
|
|
175
164
|
duration: number;
|
|
176
165
|
filters: {
|
|
177
|
-
name: string;
|
|
178
166
|
options: {
|
|
179
167
|
lutUrl: string;
|
|
180
168
|
};
|
|
@@ -214,11 +202,11 @@ export declare class Layer {
|
|
|
214
202
|
constructor();
|
|
215
203
|
init(): void;
|
|
216
204
|
destroy(): void;
|
|
217
|
-
addClip(options: Clip): Clip | null
|
|
218
|
-
addClip(options: ClipOptions): Clip | null
|
|
205
|
+
addClip(options: Clip): Promise<Clip | null>;
|
|
206
|
+
addClip(options: ClipOptions): Promise<Clip | null>;
|
|
219
207
|
removeClip(clipId: string, shouldNotDestroy?: boolean): boolean;
|
|
220
|
-
moveClipToLayer(clipId: string, newLayerId: string): void
|
|
221
|
-
splitClip(clipId: string, time: number): Clip | null
|
|
208
|
+
moveClipToLayer(clipId: string, newLayerId: string): Promise<void>;
|
|
209
|
+
splitClip(clipId: string, time: number): Promise<Clip | null>;
|
|
222
210
|
addTransition(transition: Transition): void;
|
|
223
211
|
removeTransition(transitionId: string): void;
|
|
224
212
|
getDuration(): number;
|
|
@@ -239,12 +227,10 @@ export declare class Layer {
|
|
|
239
227
|
isEnabled: boolean;
|
|
240
228
|
isMuted: boolean;
|
|
241
229
|
clips: {
|
|
242
|
-
name: string;
|
|
243
230
|
type: string;
|
|
244
231
|
id: string;
|
|
245
232
|
duration: number;
|
|
246
233
|
filters: {
|
|
247
|
-
name: string;
|
|
248
234
|
options: {
|
|
249
235
|
lutUrl: string;
|
|
250
236
|
};
|
|
@@ -39,6 +39,28 @@ export declare class MediaData {
|
|
|
39
39
|
getId(): string;
|
|
40
40
|
readFileIntoBlob(file: File, mimeType?: string): Promise<Blob>;
|
|
41
41
|
checkCompatibilityOrTranscode(filePath: string, blobUrl: string, hasAudio: boolean): Promise<boolean>;
|
|
42
|
+
hookM3U8(file: File | string | Uint8Array, mimeType: string | undefined): Promise<{
|
|
43
|
+
status: boolean;
|
|
44
|
+
data: Uint8Array;
|
|
45
|
+
filePath: string;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
} | {
|
|
48
|
+
status: boolean;
|
|
49
|
+
data?: undefined;
|
|
50
|
+
filePath?: undefined;
|
|
51
|
+
mimeType?: undefined;
|
|
52
|
+
}>;
|
|
53
|
+
hookMKV(file: File | string | Uint8Array, mimeType: string | undefined): Promise<{
|
|
54
|
+
status: boolean;
|
|
55
|
+
data: Uint8Array;
|
|
56
|
+
filePath: string;
|
|
57
|
+
mimeType: string;
|
|
58
|
+
} | {
|
|
59
|
+
status: boolean;
|
|
60
|
+
data?: undefined;
|
|
61
|
+
filePath?: undefined;
|
|
62
|
+
mimeType?: undefined;
|
|
63
|
+
}>;
|
|
42
64
|
hookRawData(file: File | string | Uint8Array, mimeType: string | undefined): Promise<{
|
|
43
65
|
status: boolean;
|
|
44
66
|
data: Uint8Array;
|
|
@@ -9,7 +9,6 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
9
9
|
isEnabled: z.ZodBoolean;
|
|
10
10
|
isMuted: z.ZodBoolean;
|
|
11
11
|
clips: z.ZodArray<z.ZodObject<{
|
|
12
|
-
name: z.ZodString;
|
|
13
12
|
id: z.ZodString;
|
|
14
13
|
type: z.ZodString;
|
|
15
14
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
@@ -21,7 +20,6 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
21
20
|
rightTrim: z.ZodNumber;
|
|
22
21
|
filters: z.ZodArray<z.ZodObject<{
|
|
23
22
|
id: z.ZodString;
|
|
24
|
-
name: z.ZodString;
|
|
25
23
|
sourceId: z.ZodString;
|
|
26
24
|
options: z.ZodObject<{
|
|
27
25
|
lutUrl: z.ZodString;
|
|
@@ -31,14 +29,12 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
31
29
|
lutUrl: string;
|
|
32
30
|
}>;
|
|
33
31
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
name: string;
|
|
35
32
|
options: {
|
|
36
33
|
lutUrl: string;
|
|
37
34
|
};
|
|
38
35
|
id: string;
|
|
39
36
|
sourceId: string;
|
|
40
37
|
}, {
|
|
41
|
-
name: string;
|
|
42
38
|
options: {
|
|
43
39
|
lutUrl: string;
|
|
44
40
|
};
|
|
@@ -50,12 +46,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
50
46
|
style: z.ZodUnknown;
|
|
51
47
|
text: z.ZodOptional<z.ZodString>;
|
|
52
48
|
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
name: string;
|
|
54
49
|
type: string;
|
|
55
50
|
id: string;
|
|
56
51
|
duration: number;
|
|
57
52
|
filters: {
|
|
58
|
-
name: string;
|
|
59
53
|
options: {
|
|
60
54
|
lutUrl: string;
|
|
61
55
|
};
|
|
@@ -73,12 +67,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
73
67
|
style?: unknown;
|
|
74
68
|
text?: string | undefined;
|
|
75
69
|
}, {
|
|
76
|
-
name: string;
|
|
77
70
|
type: string;
|
|
78
71
|
id: string;
|
|
79
72
|
duration: number;
|
|
80
73
|
filters: {
|
|
81
|
-
name: string;
|
|
82
74
|
options: {
|
|
83
75
|
lutUrl: string;
|
|
84
76
|
};
|
|
@@ -129,12 +121,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
129
121
|
isEnabled: boolean;
|
|
130
122
|
isMuted: boolean;
|
|
131
123
|
clips: {
|
|
132
|
-
name: string;
|
|
133
124
|
type: string;
|
|
134
125
|
id: string;
|
|
135
126
|
duration: number;
|
|
136
127
|
filters: {
|
|
137
|
-
name: string;
|
|
138
128
|
options: {
|
|
139
129
|
lutUrl: string;
|
|
140
130
|
};
|
|
@@ -167,12 +157,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
167
157
|
isEnabled: boolean;
|
|
168
158
|
isMuted: boolean;
|
|
169
159
|
clips: {
|
|
170
|
-
name: string;
|
|
171
160
|
type: string;
|
|
172
161
|
id: string;
|
|
173
162
|
duration: number;
|
|
174
163
|
filters: {
|
|
175
|
-
name: string;
|
|
176
164
|
options: {
|
|
177
165
|
lutUrl: string;
|
|
178
166
|
};
|
|
@@ -209,12 +197,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
209
197
|
isEnabled: boolean;
|
|
210
198
|
isMuted: boolean;
|
|
211
199
|
clips: {
|
|
212
|
-
name: string;
|
|
213
200
|
type: string;
|
|
214
201
|
id: string;
|
|
215
202
|
duration: number;
|
|
216
203
|
filters: {
|
|
217
|
-
name: string;
|
|
218
204
|
options: {
|
|
219
205
|
lutUrl: string;
|
|
220
206
|
};
|
|
@@ -251,12 +237,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
251
237
|
isEnabled: boolean;
|
|
252
238
|
isMuted: boolean;
|
|
253
239
|
clips: {
|
|
254
|
-
name: string;
|
|
255
240
|
type: string;
|
|
256
241
|
id: string;
|
|
257
242
|
duration: number;
|
|
258
243
|
filters: {
|
|
259
|
-
name: string;
|
|
260
244
|
options: {
|
|
261
245
|
lutUrl: string;
|
|
262
246
|
};
|
|
@@ -315,7 +299,7 @@ export declare class Timeline {
|
|
|
315
299
|
setSubtitles(subtitlesId: string, offset: number, clipIds?: string[]): void;
|
|
316
300
|
removeClip(clipId: string): boolean;
|
|
317
301
|
removeLayer(layerId: string): boolean;
|
|
318
|
-
moveClipToLayer(clipId: string, newLayerId: string): void
|
|
302
|
+
moveClipToLayer(clipId: string, newLayerId: string): Promise<void>;
|
|
319
303
|
alignTime(time: number, roundUp?: boolean): number;
|
|
320
304
|
adjustClipsLayout(): void;
|
|
321
305
|
getFitDuration(): number;
|
|
@@ -328,12 +312,10 @@ export declare class Timeline {
|
|
|
328
312
|
isEnabled: boolean;
|
|
329
313
|
isMuted: boolean;
|
|
330
314
|
clips: {
|
|
331
|
-
name: string;
|
|
332
315
|
type: string;
|
|
333
316
|
id: string;
|
|
334
317
|
duration: number;
|
|
335
318
|
filters: {
|
|
336
|
-
name: string;
|
|
337
319
|
options: {
|
|
338
320
|
lutUrl: string;
|
|
339
321
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function recreateDomCanvas(canvas: HTMLCanvasElement): HTMLCanvasElement;
|