@rendley/sdk 1.0.6 → 1.1.0
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 +12 -24
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/modules/clip/Clip.d.ts +4 -3
- package/dist/modules/clip/ClipStyle.d.ts +7 -1
- package/dist/modules/clip/clips/custom/CustomClip.d.ts +34 -0
- package/dist/modules/clip/clips/index.d.ts +2 -0
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +3 -3
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +3 -3
- package/dist/modules/clip/clips/shape/ShapeSprite.d.ts +9 -3
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +27 -6
- package/dist/modules/clip/clips/subtitles/SubtitlesClip.d.ts +1 -0
- package/dist/modules/clip/clips/text/TextClip.d.ts +2 -2
- package/dist/modules/clip/clips/text/TextStyle.d.ts +3 -2
- package/dist/modules/display/Display.d.ts +3 -3
- package/dist/modules/font-registry/FontRegistry.d.ts +1 -1
- package/dist/modules/layer/Layer.d.ts +5 -147
- package/dist/modules/library/Subtitles.d.ts +8 -1
- package/dist/modules/subtitleManager/SubtitleManager.d.ts +0 -1
- package/dist/modules/timeline/Timeline.d.ts +7 -190
- package/dist/types/clip.types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export declare enum ClipState {
|
|
|
10
10
|
Offloaded = 3
|
|
11
11
|
}
|
|
12
12
|
export interface ClipOptions<K extends ClipStyle = ClipStyle> {
|
|
13
|
+
type?: string;
|
|
13
14
|
id?: string;
|
|
14
15
|
mediaDataId?: string;
|
|
15
16
|
subtitlesId?: string;
|
|
@@ -62,7 +63,6 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
62
63
|
}, "strip", z.ZodTypeAny, {
|
|
63
64
|
type: string;
|
|
64
65
|
id: string;
|
|
65
|
-
duration: number;
|
|
66
66
|
filters: {
|
|
67
67
|
options: {
|
|
68
68
|
lutUrl: string;
|
|
@@ -73,6 +73,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
73
73
|
effects: unknown[];
|
|
74
74
|
subtitlesOffset: number;
|
|
75
75
|
startTime: number;
|
|
76
|
+
duration: number;
|
|
76
77
|
leftTrim: number;
|
|
77
78
|
rightTrim: number;
|
|
78
79
|
warpMode: WarpModeEnum;
|
|
@@ -83,7 +84,6 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
83
84
|
}, {
|
|
84
85
|
type: string;
|
|
85
86
|
id: string;
|
|
86
|
-
duration: number;
|
|
87
87
|
filters: {
|
|
88
88
|
options: {
|
|
89
89
|
lutUrl: string;
|
|
@@ -94,6 +94,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
94
94
|
effects: unknown[];
|
|
95
95
|
subtitlesOffset: number;
|
|
96
96
|
startTime: number;
|
|
97
|
+
duration: number;
|
|
97
98
|
leftTrim: number;
|
|
98
99
|
rightTrim: number;
|
|
99
100
|
warpMode: WarpModeEnum;
|
|
@@ -175,7 +176,6 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
175
176
|
serialize(): {
|
|
176
177
|
type: string;
|
|
177
178
|
id: string;
|
|
178
|
-
duration: number;
|
|
179
179
|
filters: {
|
|
180
180
|
options: {
|
|
181
181
|
lutUrl: string;
|
|
@@ -186,6 +186,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
186
186
|
effects: unknown[];
|
|
187
187
|
subtitlesOffset: number;
|
|
188
188
|
startTime: number;
|
|
189
|
+
duration: number;
|
|
189
190
|
leftTrim: number;
|
|
190
191
|
rightTrim: number;
|
|
191
192
|
warpMode: WarpModeEnum;
|
|
@@ -11,6 +11,7 @@ export interface ClipStyleOptions {
|
|
|
11
11
|
width?: number;
|
|
12
12
|
height?: number;
|
|
13
13
|
cornerRadius?: [number, number, number, number];
|
|
14
|
+
relativeCornerRadius?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare const schema: z.ZodObject<{
|
|
16
17
|
clipId: z.ZodString;
|
|
@@ -23,6 +24,7 @@ export declare const schema: z.ZodObject<{
|
|
|
23
24
|
width: z.ZodOptional<z.ZodNumber>;
|
|
24
25
|
height: z.ZodOptional<z.ZodNumber>;
|
|
25
26
|
cornerRadius: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
27
|
+
relativeCornerRadius: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
26
28
|
}, "strip", z.ZodTypeAny, {
|
|
27
29
|
clipId: string;
|
|
28
30
|
alpha: number;
|
|
@@ -30,6 +32,7 @@ export declare const schema: z.ZodObject<{
|
|
|
30
32
|
position: [number, number];
|
|
31
33
|
scale: [number, number];
|
|
32
34
|
zIndex: number;
|
|
35
|
+
relativeCornerRadius: boolean;
|
|
33
36
|
mediaDataId?: string | undefined;
|
|
34
37
|
width?: number | undefined;
|
|
35
38
|
height?: number | undefined;
|
|
@@ -45,6 +48,7 @@ export declare const schema: z.ZodObject<{
|
|
|
45
48
|
width?: number | undefined;
|
|
46
49
|
height?: number | undefined;
|
|
47
50
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
51
|
+
relativeCornerRadius?: boolean | undefined;
|
|
48
52
|
}>;
|
|
49
53
|
export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
50
54
|
protected alpha: number;
|
|
@@ -55,6 +59,7 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
55
59
|
protected height: number;
|
|
56
60
|
protected scale: [number, number];
|
|
57
61
|
protected cornerRadius: number[];
|
|
62
|
+
protected relativeCornerRadius: boolean;
|
|
58
63
|
protected sprite: T | null;
|
|
59
64
|
private clipId;
|
|
60
65
|
private mediaDataId;
|
|
@@ -62,7 +67,7 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
62
67
|
constructor(options: ClipStyleOptions);
|
|
63
68
|
private positionToCenter;
|
|
64
69
|
private scaleDownToFit;
|
|
65
|
-
setCornerRadius(radii: number | [number, number, number, number]): void;
|
|
70
|
+
setCornerRadius(radii: number | [number, number, number, number], relative?: boolean): void;
|
|
66
71
|
getCornerRadius(): number[];
|
|
67
72
|
setScale(scaleX: number, scaleY: number): void;
|
|
68
73
|
getScale(): [number, number];
|
|
@@ -89,6 +94,7 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
89
94
|
position: [number, number];
|
|
90
95
|
scale: [number, number];
|
|
91
96
|
zIndex: number;
|
|
97
|
+
relativeCornerRadius: boolean;
|
|
92
98
|
mediaDataId?: string | undefined;
|
|
93
99
|
width?: number | undefined;
|
|
94
100
|
height?: number | undefined;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
3
|
+
import { ClipStyle } from "../../ClipStyle";
|
|
4
|
+
export declare class CustomClip extends Clip<PIXI.Sprite, ClipStyle> {
|
|
5
|
+
constructor(options: ClipOptions);
|
|
6
|
+
init(layerId: string): Promise<void>;
|
|
7
|
+
updateVisibility(currentTime: number): void;
|
|
8
|
+
update(currentTime: number): void;
|
|
9
|
+
clone(): any;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
serialize(): {
|
|
12
|
+
type: string;
|
|
13
|
+
id: string;
|
|
14
|
+
filters: {
|
|
15
|
+
options: {
|
|
16
|
+
lutUrl: string;
|
|
17
|
+
};
|
|
18
|
+
id: string;
|
|
19
|
+
sourceId: string;
|
|
20
|
+
}[];
|
|
21
|
+
effects: unknown[];
|
|
22
|
+
subtitlesOffset: number;
|
|
23
|
+
startTime: number;
|
|
24
|
+
duration: number;
|
|
25
|
+
leftTrim: number;
|
|
26
|
+
rightTrim: number;
|
|
27
|
+
warpMode: import('../../../../index').WarpModeEnum;
|
|
28
|
+
mediaDataId?: string | undefined;
|
|
29
|
+
subtitlesId?: string | undefined;
|
|
30
|
+
style?: unknown;
|
|
31
|
+
text?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
static deserialize(payload: object): CustomClip;
|
|
34
|
+
}
|
|
@@ -19,13 +19,12 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
19
19
|
clone(): LottieClip;
|
|
20
20
|
destroy(): void;
|
|
21
21
|
replaceText(layerId: string | number, text: string): void;
|
|
22
|
-
private
|
|
22
|
+
private updateShapesFillCachedData;
|
|
23
23
|
replaceFillColor(layerId: string | number, color: Array<number>): void;
|
|
24
24
|
replaceImage(layerId: string | number, url: string): void;
|
|
25
25
|
serialize(): {
|
|
26
26
|
type: string;
|
|
27
27
|
id: string;
|
|
28
|
-
duration: number;
|
|
29
28
|
filters: {
|
|
30
29
|
options: {
|
|
31
30
|
lutUrl: string;
|
|
@@ -36,14 +35,15 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
36
35
|
effects: unknown[];
|
|
37
36
|
subtitlesOffset: number;
|
|
38
37
|
startTime: number;
|
|
38
|
+
duration: number;
|
|
39
39
|
leftTrim: number;
|
|
40
40
|
rightTrim: number;
|
|
41
41
|
warpMode: import('../../../../types').WarpModeEnum;
|
|
42
42
|
dataUrl: string;
|
|
43
43
|
text?: string | undefined;
|
|
44
|
-
style?: unknown;
|
|
45
44
|
mediaDataId?: string | undefined;
|
|
46
45
|
subtitlesId?: string | undefined;
|
|
46
|
+
style?: unknown;
|
|
47
47
|
assetsUrl?: string | undefined;
|
|
48
48
|
};
|
|
49
49
|
static deserialize(payload: object): LottieClip;
|
|
@@ -15,10 +15,9 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
15
15
|
clone(): ShapeClip;
|
|
16
16
|
destroy(): void;
|
|
17
17
|
serialize(): {
|
|
18
|
+
shape: string;
|
|
18
19
|
type: string;
|
|
19
20
|
id: string;
|
|
20
|
-
shape: string;
|
|
21
|
-
duration: number;
|
|
22
21
|
filters: {
|
|
23
22
|
options: {
|
|
24
23
|
lutUrl: string;
|
|
@@ -29,13 +28,14 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
29
28
|
effects: unknown[];
|
|
30
29
|
subtitlesOffset: number;
|
|
31
30
|
startTime: number;
|
|
31
|
+
duration: number;
|
|
32
32
|
leftTrim: number;
|
|
33
33
|
rightTrim: number;
|
|
34
34
|
warpMode: import('../../../../types').WarpModeEnum;
|
|
35
35
|
text?: string | undefined;
|
|
36
|
-
style?: unknown;
|
|
37
36
|
mediaDataId?: string | undefined;
|
|
38
37
|
subtitlesId?: string | undefined;
|
|
38
|
+
style?: unknown;
|
|
39
39
|
};
|
|
40
40
|
static deserialize(payload: object): ShapeClip;
|
|
41
41
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as PIXI from "pixi.js";
|
|
2
2
|
export declare class ShapeSprite extends PIXI.Sprite {
|
|
3
3
|
graphics: PIXI.Graphics;
|
|
4
|
+
fillColor: string;
|
|
5
|
+
strokeColor: string;
|
|
6
|
+
strokeWidth: number;
|
|
7
|
+
strokeAlpha: number;
|
|
8
|
+
hasFill: boolean;
|
|
4
9
|
constructor();
|
|
5
|
-
drawRect(width: number, height: number
|
|
6
|
-
drawCircle(width: number, height: number
|
|
7
|
-
drawTriangle(width: number, height: number
|
|
10
|
+
drawRect(width: number, height: number): void;
|
|
11
|
+
drawCircle(width: number, height: number): void;
|
|
12
|
+
drawTriangle(width: number, height: number): void;
|
|
13
|
+
drawElipse(width: number, height: number): void;
|
|
8
14
|
destroy(): void;
|
|
9
15
|
}
|
|
@@ -1,26 +1,47 @@
|
|
|
1
1
|
import { ShapeSprite } from "./ShapeSprite";
|
|
2
2
|
import { ClipStyle, ClipStyleOptions } from "../../ClipStyle";
|
|
3
3
|
interface ShapeClipStyleOptions extends ClipStyleOptions {
|
|
4
|
-
|
|
4
|
+
fillColor?: string;
|
|
5
|
+
strokeColor?: string;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
strokeAlpha?: number;
|
|
8
|
+
hasFill?: boolean;
|
|
5
9
|
}
|
|
6
10
|
export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
7
|
-
|
|
11
|
+
protected fillColor: string;
|
|
12
|
+
protected strokeColor: string;
|
|
13
|
+
protected strokeWidth: number;
|
|
14
|
+
protected strokeAlpha: number;
|
|
15
|
+
protected hasFill: boolean;
|
|
8
16
|
constructor(options: ShapeClipStyleOptions);
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
setFillColor(fillColor: string): void;
|
|
18
|
+
getFillColor(): string;
|
|
19
|
+
setStrokeColor(strokeColor: string): void;
|
|
20
|
+
getStrokeColor(): string;
|
|
21
|
+
setStrokeWidth(strokeWidth: number): void;
|
|
22
|
+
getStrokeWidth(): number;
|
|
23
|
+
setStrokeAlpha(strokeAlpha: number): void;
|
|
24
|
+
getStrokeAlpha(): number;
|
|
25
|
+
setHasFill(hasFill: boolean): void;
|
|
26
|
+
getHasFill(): boolean;
|
|
11
27
|
update(container: ShapeSprite): void;
|
|
12
28
|
serialize(): {
|
|
13
|
-
color: string;
|
|
14
29
|
clipId: string;
|
|
15
30
|
alpha: number;
|
|
16
31
|
rotation: number;
|
|
17
32
|
position: [number, number];
|
|
18
33
|
scale: [number, number];
|
|
19
34
|
zIndex: number;
|
|
35
|
+
relativeCornerRadius: boolean;
|
|
36
|
+
hasFill: boolean;
|
|
37
|
+
mediaDataId?: string | undefined;
|
|
20
38
|
width?: number | undefined;
|
|
21
39
|
height?: number | undefined;
|
|
22
|
-
mediaDataId?: string | undefined;
|
|
23
40
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
41
|
+
fillColor?: string | undefined;
|
|
42
|
+
strokeColor?: string | undefined;
|
|
43
|
+
strokeWidth?: number | undefined;
|
|
44
|
+
strokeAlpha?: number | undefined;
|
|
24
45
|
};
|
|
25
46
|
static deserialize(payload: object): ShapeStyle;
|
|
26
47
|
}
|
|
@@ -4,6 +4,7 @@ import { ClipStyle } from "../../ClipStyle";
|
|
|
4
4
|
export declare class SubtitlesClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
|
|
5
5
|
constructor(options: ClipOptions);
|
|
6
6
|
init(layerId: string): Promise<void>;
|
|
7
|
+
updateDuration(): void;
|
|
7
8
|
clone(): Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>;
|
|
8
9
|
hasSprite(): boolean;
|
|
9
10
|
}
|
|
@@ -18,7 +18,6 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
18
18
|
text: string;
|
|
19
19
|
type: string;
|
|
20
20
|
id: string;
|
|
21
|
-
duration: number;
|
|
22
21
|
filters: {
|
|
23
22
|
options: {
|
|
24
23
|
lutUrl: string;
|
|
@@ -29,12 +28,13 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
29
28
|
effects: unknown[];
|
|
30
29
|
subtitlesOffset: number;
|
|
31
30
|
startTime: number;
|
|
31
|
+
duration: number;
|
|
32
32
|
leftTrim: number;
|
|
33
33
|
rightTrim: number;
|
|
34
34
|
warpMode: import('../../../../index').WarpModeEnum;
|
|
35
|
-
style?: unknown;
|
|
36
35
|
mediaDataId?: string | undefined;
|
|
37
36
|
subtitlesId?: string | undefined;
|
|
37
|
+
style?: unknown;
|
|
38
38
|
};
|
|
39
39
|
static deserialize(payload: object): TextClip;
|
|
40
40
|
}
|
|
@@ -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
|
-
backgroundColor: string | null;
|
|
50
49
|
color: string;
|
|
51
50
|
clipId: string;
|
|
52
51
|
alpha: number;
|
|
@@ -54,14 +53,16 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
54
53
|
position: [number, number];
|
|
55
54
|
scale: [number, number];
|
|
56
55
|
zIndex: number;
|
|
56
|
+
relativeCornerRadius: boolean;
|
|
57
|
+
backgroundColor: string | null;
|
|
57
58
|
fontSize: number;
|
|
58
59
|
fontWeight: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
59
60
|
fontFamily: string;
|
|
60
61
|
textAlign: "left" | "center" | "right" | "justify";
|
|
61
62
|
fontStyle: "normal" | "italic" | "oblique";
|
|
63
|
+
mediaDataId?: string | undefined;
|
|
62
64
|
width?: number | undefined;
|
|
63
65
|
height?: number | undefined;
|
|
64
|
-
mediaDataId?: string | undefined;
|
|
65
66
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
66
67
|
};
|
|
67
68
|
static deserialize(payload: object): TextStyle;
|
|
@@ -6,12 +6,12 @@ export declare const DisplaySchema: z.ZodObject<{
|
|
|
6
6
|
backgroundColor: z.ZodString;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
8
|
width: number;
|
|
9
|
-
backgroundColor: string;
|
|
10
9
|
height: number;
|
|
10
|
+
backgroundColor: string;
|
|
11
11
|
}, {
|
|
12
12
|
width: number;
|
|
13
|
-
backgroundColor: string;
|
|
14
13
|
height: number;
|
|
14
|
+
backgroundColor: string;
|
|
15
15
|
}>;
|
|
16
16
|
export type DisplayOptions = Partial<Omit<PixiRendererInitOptions, "view">> & {
|
|
17
17
|
view: HTMLCanvasElement;
|
|
@@ -35,8 +35,8 @@ export declare class Display {
|
|
|
35
35
|
destroy(): void;
|
|
36
36
|
serialize(): {
|
|
37
37
|
width: number;
|
|
38
|
-
backgroundColor: string;
|
|
39
38
|
height: number;
|
|
39
|
+
backgroundColor: string;
|
|
40
40
|
};
|
|
41
41
|
static deserialize(data: object): Display;
|
|
42
42
|
}
|
|
@@ -10,86 +10,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
10
10
|
id: z.ZodString;
|
|
11
11
|
isEnabled: z.ZodBoolean;
|
|
12
12
|
isMuted: z.ZodBoolean;
|
|
13
|
-
clips: z.ZodArray<z.
|
|
14
|
-
id: z.ZodString;
|
|
15
|
-
type: z.ZodString;
|
|
16
|
-
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
17
|
-
subtitlesId: z.ZodOptional<z.ZodString>;
|
|
18
|
-
subtitlesOffset: z.ZodNumber;
|
|
19
|
-
startTime: z.ZodNumber;
|
|
20
|
-
duration: z.ZodNumber;
|
|
21
|
-
leftTrim: z.ZodNumber;
|
|
22
|
-
rightTrim: z.ZodNumber;
|
|
23
|
-
filters: z.ZodArray<z.ZodObject<{
|
|
24
|
-
id: z.ZodString;
|
|
25
|
-
sourceId: z.ZodString;
|
|
26
|
-
options: z.ZodObject<{
|
|
27
|
-
lutUrl: z.ZodString;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
lutUrl: string;
|
|
30
|
-
}, {
|
|
31
|
-
lutUrl: string;
|
|
32
|
-
}>;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
options: {
|
|
35
|
-
lutUrl: string;
|
|
36
|
-
};
|
|
37
|
-
id: string;
|
|
38
|
-
sourceId: string;
|
|
39
|
-
}, {
|
|
40
|
-
options: {
|
|
41
|
-
lutUrl: string;
|
|
42
|
-
};
|
|
43
|
-
id: string;
|
|
44
|
-
sourceId: string;
|
|
45
|
-
}>, "many">;
|
|
46
|
-
effects: z.ZodArray<z.ZodUnknown, "many">;
|
|
47
|
-
warpMode: z.ZodNativeEnum<typeof import('../../types').WarpModeEnum>;
|
|
48
|
-
style: z.ZodUnknown;
|
|
49
|
-
text: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
type: string;
|
|
52
|
-
id: string;
|
|
53
|
-
duration: number;
|
|
54
|
-
filters: {
|
|
55
|
-
options: {
|
|
56
|
-
lutUrl: string;
|
|
57
|
-
};
|
|
58
|
-
id: string;
|
|
59
|
-
sourceId: string;
|
|
60
|
-
}[];
|
|
61
|
-
effects: unknown[];
|
|
62
|
-
subtitlesOffset: number;
|
|
63
|
-
startTime: number;
|
|
64
|
-
leftTrim: number;
|
|
65
|
-
rightTrim: number;
|
|
66
|
-
warpMode: import('../../types').WarpModeEnum;
|
|
67
|
-
mediaDataId?: string | undefined;
|
|
68
|
-
subtitlesId?: string | undefined;
|
|
69
|
-
style?: unknown;
|
|
70
|
-
text?: string | undefined;
|
|
71
|
-
}, {
|
|
72
|
-
type: string;
|
|
73
|
-
id: string;
|
|
74
|
-
duration: number;
|
|
75
|
-
filters: {
|
|
76
|
-
options: {
|
|
77
|
-
lutUrl: string;
|
|
78
|
-
};
|
|
79
|
-
id: string;
|
|
80
|
-
sourceId: string;
|
|
81
|
-
}[];
|
|
82
|
-
effects: unknown[];
|
|
83
|
-
subtitlesOffset: number;
|
|
84
|
-
startTime: number;
|
|
85
|
-
leftTrim: number;
|
|
86
|
-
rightTrim: number;
|
|
87
|
-
warpMode: import('../../types').WarpModeEnum;
|
|
88
|
-
mediaDataId?: string | undefined;
|
|
89
|
-
subtitlesId?: string | undefined;
|
|
90
|
-
style?: unknown;
|
|
91
|
-
text?: string | undefined;
|
|
92
|
-
}>, "many">;
|
|
13
|
+
clips: z.ZodArray<z.ZodAny, "many">;
|
|
93
14
|
transitions: z.ZodArray<z.ZodObject<{
|
|
94
15
|
id: z.ZodString;
|
|
95
16
|
name: z.ZodString;
|
|
@@ -122,28 +43,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
122
43
|
id: string;
|
|
123
44
|
isEnabled: boolean;
|
|
124
45
|
isMuted: boolean;
|
|
125
|
-
clips:
|
|
126
|
-
type: string;
|
|
127
|
-
id: string;
|
|
128
|
-
duration: number;
|
|
129
|
-
filters: {
|
|
130
|
-
options: {
|
|
131
|
-
lutUrl: string;
|
|
132
|
-
};
|
|
133
|
-
id: string;
|
|
134
|
-
sourceId: string;
|
|
135
|
-
}[];
|
|
136
|
-
effects: unknown[];
|
|
137
|
-
subtitlesOffset: number;
|
|
138
|
-
startTime: number;
|
|
139
|
-
leftTrim: number;
|
|
140
|
-
rightTrim: number;
|
|
141
|
-
warpMode: import('../../types').WarpModeEnum;
|
|
142
|
-
mediaDataId?: string | undefined;
|
|
143
|
-
subtitlesId?: string | undefined;
|
|
144
|
-
style?: unknown;
|
|
145
|
-
text?: string | undefined;
|
|
146
|
-
}[];
|
|
46
|
+
clips: any[];
|
|
147
47
|
transitions: {
|
|
148
48
|
name: string;
|
|
149
49
|
type: "transition";
|
|
@@ -158,28 +58,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
158
58
|
id: string;
|
|
159
59
|
isEnabled: boolean;
|
|
160
60
|
isMuted: boolean;
|
|
161
|
-
clips:
|
|
162
|
-
type: string;
|
|
163
|
-
id: string;
|
|
164
|
-
duration: number;
|
|
165
|
-
filters: {
|
|
166
|
-
options: {
|
|
167
|
-
lutUrl: string;
|
|
168
|
-
};
|
|
169
|
-
id: string;
|
|
170
|
-
sourceId: string;
|
|
171
|
-
}[];
|
|
172
|
-
effects: unknown[];
|
|
173
|
-
subtitlesOffset: number;
|
|
174
|
-
startTime: number;
|
|
175
|
-
leftTrim: number;
|
|
176
|
-
rightTrim: number;
|
|
177
|
-
warpMode: import('../../types').WarpModeEnum;
|
|
178
|
-
mediaDataId?: string | undefined;
|
|
179
|
-
subtitlesId?: string | undefined;
|
|
180
|
-
style?: unknown;
|
|
181
|
-
text?: string | undefined;
|
|
182
|
-
}[];
|
|
61
|
+
clips: any[];
|
|
183
62
|
transitions: {
|
|
184
63
|
name: string;
|
|
185
64
|
type: "transition";
|
|
@@ -205,7 +84,7 @@ export declare class Layer {
|
|
|
205
84
|
addClip(options: Clip): Promise<Clip | null>;
|
|
206
85
|
addClip(options: ClipOptions): Promise<Clip | null>;
|
|
207
86
|
removeClip(clipId: string, shouldNotDestroy?: boolean): boolean;
|
|
208
|
-
moveClipToLayer(clipId: string, newLayerId: string):
|
|
87
|
+
moveClipToLayer(clipId: string, newLayerId: string): void;
|
|
209
88
|
splitClip(clipId: string, time: number): Promise<Clip | null>;
|
|
210
89
|
addTransition(transition: Transition): void;
|
|
211
90
|
removeTransition(transitionId: string): void;
|
|
@@ -226,28 +105,7 @@ export declare class Layer {
|
|
|
226
105
|
id: string;
|
|
227
106
|
isEnabled: boolean;
|
|
228
107
|
isMuted: boolean;
|
|
229
|
-
clips:
|
|
230
|
-
type: string;
|
|
231
|
-
id: string;
|
|
232
|
-
duration: number;
|
|
233
|
-
filters: {
|
|
234
|
-
options: {
|
|
235
|
-
lutUrl: string;
|
|
236
|
-
};
|
|
237
|
-
id: string;
|
|
238
|
-
sourceId: string;
|
|
239
|
-
}[];
|
|
240
|
-
effects: unknown[];
|
|
241
|
-
subtitlesOffset: number;
|
|
242
|
-
startTime: number;
|
|
243
|
-
leftTrim: number;
|
|
244
|
-
rightTrim: number;
|
|
245
|
-
warpMode: import('../../types').WarpModeEnum;
|
|
246
|
-
mediaDataId?: string | undefined;
|
|
247
|
-
subtitlesId?: string | undefined;
|
|
248
|
-
style?: unknown;
|
|
249
|
-
text?: string | undefined;
|
|
250
|
-
}[];
|
|
108
|
+
clips: any[];
|
|
251
109
|
transitions: {
|
|
252
110
|
name: string;
|
|
253
111
|
type: "transition";
|
|
@@ -62,13 +62,20 @@ export declare class Subtitles {
|
|
|
62
62
|
protected id: string;
|
|
63
63
|
protected language: string;
|
|
64
64
|
protected duration: number;
|
|
65
|
-
textBlocks: TextBlock[];
|
|
65
|
+
protected textBlocks: TextBlock[];
|
|
66
66
|
constructor(options?: SubtitlesOptions);
|
|
67
67
|
getId(): string;
|
|
68
68
|
getLanguage(): string;
|
|
69
69
|
getDuration(): number;
|
|
70
|
+
getTextBlocks(): TextBlock[];
|
|
71
|
+
addTextBlock(textBlock: TextBlock, index?: number): void;
|
|
72
|
+
removeTextBlock(index: number): void;
|
|
73
|
+
setTextBlocks(textBlocks: TextBlock[]): void;
|
|
74
|
+
updateTextBlock(index: number, textBlock: Partial<TextBlock>): void;
|
|
75
|
+
setLanguage(language: string): void;
|
|
70
76
|
setDuration(duration: number): void;
|
|
71
77
|
fitDurationToBlocks(): void;
|
|
78
|
+
validateTextBlocks(): void;
|
|
72
79
|
serialize(): {
|
|
73
80
|
id: string;
|
|
74
81
|
duration: number;
|