@rendley/sdk 1.0.5 → 1.0.7
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 +9 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/clip/Clip.d.ts +7 -6
- package/dist/modules/clip/ClipStyle.d.ts +17 -11
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +4 -0
- package/dist/modules/clip/clips/index.d.ts +1 -0
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +2 -2
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +1 -1
- package/dist/modules/clip/clips/shape/ShapeSprite.d.ts +9 -3
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +28 -7
- package/dist/modules/clip/clips/subtitles/SubtitlesClip.d.ts +10 -0
- package/dist/modules/clip/clips/text/TextClip.d.ts +1 -1
- package/dist/modules/clip/clips/text/TextStyle.d.ts +3 -2
- package/dist/modules/clip/clips/video/VideoClip.d.ts +3 -0
- package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +6 -0
- package/dist/modules/layer/Layer.d.ts +7 -7
- package/dist/modules/library/Library.d.ts +23 -17
- package/dist/modules/library/MediaData.d.ts +5 -4
- package/dist/modules/library/Subtitles.d.ts +23 -2
- package/dist/modules/subtitleManager/SubtitleManager.d.ts +0 -1
- package/dist/modules/timeline/Timeline.d.ts +11 -9
- package/dist/types/clip.types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import * as PIXI from "pixi.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { ClipStyle } from "./ClipStyle";
|
|
4
4
|
import { Effect, Filter } from "../filter";
|
|
5
|
-
import {
|
|
5
|
+
import { WarpModeEnum } from '../../types/clip.types';
|
|
6
6
|
export declare enum ClipState {
|
|
7
7
|
Idle = 0,
|
|
8
8
|
Preloading = 1,
|
|
@@ -56,7 +56,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
56
56
|
sourceId: string;
|
|
57
57
|
}>, "many">;
|
|
58
58
|
effects: z.ZodArray<z.ZodUnknown, "many">;
|
|
59
|
-
warpMode: z.ZodNativeEnum<typeof
|
|
59
|
+
warpMode: z.ZodNativeEnum<typeof WarpModeEnum>;
|
|
60
60
|
style: z.ZodUnknown;
|
|
61
61
|
text: z.ZodOptional<z.ZodString>;
|
|
62
62
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -75,7 +75,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
75
75
|
startTime: number;
|
|
76
76
|
leftTrim: number;
|
|
77
77
|
rightTrim: number;
|
|
78
|
-
warpMode:
|
|
78
|
+
warpMode: WarpModeEnum;
|
|
79
79
|
mediaDataId?: string | undefined;
|
|
80
80
|
subtitlesId?: string | undefined;
|
|
81
81
|
style?: unknown;
|
|
@@ -96,7 +96,7 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
96
96
|
startTime: number;
|
|
97
97
|
leftTrim: number;
|
|
98
98
|
rightTrim: number;
|
|
99
|
-
warpMode:
|
|
99
|
+
warpMode: WarpModeEnum;
|
|
100
100
|
mediaDataId?: string | undefined;
|
|
101
101
|
subtitlesId?: string | undefined;
|
|
102
102
|
style?: unknown;
|
|
@@ -110,7 +110,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
110
110
|
protected rightTrim: number;
|
|
111
111
|
protected filters: Filter[];
|
|
112
112
|
protected effects: Effect[];
|
|
113
|
-
protected warpMode:
|
|
113
|
+
protected warpMode: WarpModeEnum;
|
|
114
114
|
protected isBuffering: boolean;
|
|
115
115
|
protected mediaDataId?: string;
|
|
116
116
|
protected subtitlesId?: string;
|
|
@@ -166,6 +166,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
166
166
|
private processUpdate;
|
|
167
167
|
getSubtitleText(currentTime: number): string | undefined;
|
|
168
168
|
private updatePIXIFilters;
|
|
169
|
+
hasSprite(): boolean;
|
|
169
170
|
update(currentTime: number): void;
|
|
170
171
|
preload(currentTime: number): void;
|
|
171
172
|
offload(): void;
|
|
@@ -187,7 +188,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
187
188
|
startTime: number;
|
|
188
189
|
leftTrim: number;
|
|
189
190
|
rightTrim: number;
|
|
190
|
-
warpMode:
|
|
191
|
+
warpMode: WarpModeEnum;
|
|
191
192
|
mediaDataId?: string | undefined;
|
|
192
193
|
subtitlesId?: string | undefined;
|
|
193
194
|
style?: unknown;
|
|
@@ -10,7 +10,8 @@ export interface ClipStyleOptions {
|
|
|
10
10
|
zIndex?: number;
|
|
11
11
|
width?: number;
|
|
12
12
|
height?: number;
|
|
13
|
-
cornerRadius?: number;
|
|
13
|
+
cornerRadius?: [number, number, number, number];
|
|
14
|
+
relativeCornerRadius?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare const schema: z.ZodObject<{
|
|
16
17
|
clipId: z.ZodString;
|
|
@@ -22,29 +23,32 @@ export declare const schema: z.ZodObject<{
|
|
|
22
23
|
zIndex: z.ZodNumber;
|
|
23
24
|
width: z.ZodOptional<z.ZodNumber>;
|
|
24
25
|
height: z.ZodOptional<z.ZodNumber>;
|
|
25
|
-
cornerRadius: z.ZodOptional<z.ZodNumber
|
|
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, {
|
|
29
|
+
position: [number, number];
|
|
27
30
|
clipId: string;
|
|
28
31
|
alpha: number;
|
|
29
32
|
rotation: number;
|
|
30
|
-
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;
|
|
36
|
-
cornerRadius?: number | undefined;
|
|
39
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
37
40
|
}, {
|
|
41
|
+
position: [number, number];
|
|
38
42
|
clipId: string;
|
|
39
43
|
alpha: number;
|
|
40
44
|
rotation: number;
|
|
41
|
-
position: [number, number];
|
|
42
45
|
scale: [number, number];
|
|
43
46
|
zIndex: number;
|
|
44
47
|
mediaDataId?: string | undefined;
|
|
45
48
|
width?: number | undefined;
|
|
46
49
|
height?: number | undefined;
|
|
47
|
-
cornerRadius?: number | undefined;
|
|
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;
|
|
@@ -54,7 +58,8 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
54
58
|
protected width: number;
|
|
55
59
|
protected height: number;
|
|
56
60
|
protected scale: [number, number];
|
|
57
|
-
protected cornerRadius: number;
|
|
61
|
+
protected cornerRadius: number[];
|
|
62
|
+
protected relativeCornerRadius: boolean;
|
|
58
63
|
protected sprite: T | null;
|
|
59
64
|
private clipId;
|
|
60
65
|
private mediaDataId;
|
|
@@ -62,8 +67,8 @@ 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(
|
|
66
|
-
getCornerRadius(): number;
|
|
70
|
+
setCornerRadius(radii: number | [number, number, number, number], relative?: boolean): void;
|
|
71
|
+
getCornerRadius(): number[];
|
|
67
72
|
setScale(scaleX: number, scaleY: number): void;
|
|
68
73
|
getScale(): [number, number];
|
|
69
74
|
getWidth(): number;
|
|
@@ -83,16 +88,17 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
83
88
|
private setCornerRadiusOnSprite;
|
|
84
89
|
protected emitUpdateEvent(property: string, value: unknown): boolean;
|
|
85
90
|
serialize(): {
|
|
91
|
+
position: [number, number];
|
|
86
92
|
clipId: string;
|
|
87
93
|
alpha: number;
|
|
88
94
|
rotation: number;
|
|
89
|
-
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;
|
|
95
|
-
cornerRadius?: number | undefined;
|
|
101
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
96
102
|
};
|
|
97
103
|
static deserialize(payload: object): ClipStyle<PIXI.Sprite>;
|
|
98
104
|
}
|
|
@@ -31,6 +31,10 @@ export declare class AudioClip extends Clip {
|
|
|
31
31
|
onPause(currentTime: number): Promise<void>;
|
|
32
32
|
destroy(): void;
|
|
33
33
|
update(currentTime: number): void;
|
|
34
|
+
mute(): void;
|
|
35
|
+
unMute(): void;
|
|
36
|
+
extractMonoAudioData(startTime: number, endTime: number): Promise<Float32Array | null>;
|
|
34
37
|
offload(): void;
|
|
35
38
|
clone(): Clip<import("pixi.js").Sprite, import("../..").ClipStyle<import("pixi.js").Sprite>>;
|
|
39
|
+
hasSprite(): boolean;
|
|
36
40
|
}
|
|
@@ -19,7 +19,7 @@ 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(): {
|
|
@@ -38,7 +38,7 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
38
38
|
startTime: number;
|
|
39
39
|
leftTrim: number;
|
|
40
40
|
rightTrim: number;
|
|
41
|
-
warpMode: import('../../../../types').
|
|
41
|
+
warpMode: import('../../../../types').WarpModeEnum;
|
|
42
42
|
dataUrl: string;
|
|
43
43
|
text?: string | undefined;
|
|
44
44
|
style?: unknown;
|
|
@@ -31,7 +31,7 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
31
31
|
startTime: number;
|
|
32
32
|
leftTrim: number;
|
|
33
33
|
rightTrim: number;
|
|
34
|
-
warpMode: import('../../../../types').
|
|
34
|
+
warpMode: import('../../../../types').WarpModeEnum;
|
|
35
35
|
text?: string | undefined;
|
|
36
36
|
style?: unknown;
|
|
37
37
|
mediaDataId?: string | undefined;
|
|
@@ -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
|
-
|
|
29
|
+
position: [number, number];
|
|
14
30
|
clipId: string;
|
|
15
31
|
alpha: number;
|
|
16
32
|
rotation: number;
|
|
17
|
-
position: [number, number];
|
|
18
33
|
scale: [number, number];
|
|
19
34
|
zIndex: number;
|
|
35
|
+
relativeCornerRadius: boolean;
|
|
36
|
+
hasFill: boolean;
|
|
20
37
|
width?: number | undefined;
|
|
21
38
|
height?: number | undefined;
|
|
22
39
|
mediaDataId?: string | undefined;
|
|
23
|
-
cornerRadius?: number | undefined;
|
|
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
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
3
|
+
import { ClipStyle } from "../../ClipStyle";
|
|
4
|
+
export declare class SubtitlesClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
|
|
5
|
+
constructor(options: ClipOptions);
|
|
6
|
+
init(layerId: string): Promise<void>;
|
|
7
|
+
updateDuration(): void;
|
|
8
|
+
clone(): Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>;
|
|
9
|
+
hasSprite(): boolean;
|
|
10
|
+
}
|
|
@@ -31,7 +31,7 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
31
31
|
startTime: number;
|
|
32
32
|
leftTrim: number;
|
|
33
33
|
rightTrim: number;
|
|
34
|
-
warpMode: import('../../../../index').
|
|
34
|
+
warpMode: import('../../../../index').WarpModeEnum;
|
|
35
35
|
style?: unknown;
|
|
36
36
|
mediaDataId?: string | undefined;
|
|
37
37
|
subtitlesId?: string | undefined;
|
|
@@ -48,12 +48,13 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
48
48
|
serialize(): {
|
|
49
49
|
backgroundColor: string | null;
|
|
50
50
|
color: string;
|
|
51
|
+
position: [number, number];
|
|
51
52
|
clipId: string;
|
|
52
53
|
alpha: number;
|
|
53
54
|
rotation: number;
|
|
54
|
-
position: [number, number];
|
|
55
55
|
scale: [number, number];
|
|
56
56
|
zIndex: number;
|
|
57
|
+
relativeCornerRadius: boolean;
|
|
57
58
|
fontSize: number;
|
|
58
59
|
fontWeight: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
59
60
|
fontFamily: string;
|
|
@@ -62,7 +63,7 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
62
63
|
width?: number | undefined;
|
|
63
64
|
height?: number | undefined;
|
|
64
65
|
mediaDataId?: string | undefined;
|
|
65
|
-
cornerRadius?: number | undefined;
|
|
66
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
66
67
|
};
|
|
67
68
|
static deserialize(payload: object): TextStyle;
|
|
68
69
|
}
|
|
@@ -43,6 +43,9 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
43
43
|
onPause(currentTime: number): Promise<void>;
|
|
44
44
|
updateVisibility(currentTime: number): void;
|
|
45
45
|
update(currentTime: number): void;
|
|
46
|
+
mute(): void;
|
|
47
|
+
unMute(): void;
|
|
48
|
+
extractMonoAudioData(startTime: number, endTime: number): Promise<Float32Array | null>;
|
|
46
49
|
offload(): void;
|
|
47
50
|
clone(): Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>;
|
|
48
51
|
}
|
|
@@ -29,6 +29,7 @@ export declare enum EventsEnum {
|
|
|
29
29
|
LIBRARY_REMOVED = "library:removed",
|
|
30
30
|
LIBRARY_ERROR = "library:error",
|
|
31
31
|
LIBRARY_MEDIA_UPDATED = "library:media:updated",
|
|
32
|
+
LIBRARY_PROGRESS = "library:progress",
|
|
32
33
|
SUBTITLES_ADDED = "subtitles:added",
|
|
33
34
|
SUBTITLES_REMOVED = "subtitles:removed",
|
|
34
35
|
FONT_ADDED = "font:added",
|
|
@@ -147,6 +148,11 @@ export type EventPayloadMap = {
|
|
|
147
148
|
mediaDataId: string;
|
|
148
149
|
status: string;
|
|
149
150
|
};
|
|
151
|
+
[EventsEnum.LIBRARY_PROGRESS]: {
|
|
152
|
+
mediaDataId: string;
|
|
153
|
+
status: string;
|
|
154
|
+
progress: number;
|
|
155
|
+
};
|
|
150
156
|
[EventsEnum.SUBTITLES_ADDED]: {
|
|
151
157
|
subtitlesId: string;
|
|
152
158
|
};
|
|
@@ -44,7 +44,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
44
44
|
sourceId: string;
|
|
45
45
|
}>, "many">;
|
|
46
46
|
effects: z.ZodArray<z.ZodUnknown, "many">;
|
|
47
|
-
warpMode: z.ZodNativeEnum<typeof import('../../types').
|
|
47
|
+
warpMode: z.ZodNativeEnum<typeof import('../../types').WarpModeEnum>;
|
|
48
48
|
style: z.ZodUnknown;
|
|
49
49
|
text: z.ZodOptional<z.ZodString>;
|
|
50
50
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -63,7 +63,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
63
63
|
startTime: number;
|
|
64
64
|
leftTrim: number;
|
|
65
65
|
rightTrim: number;
|
|
66
|
-
warpMode: import('../../types').
|
|
66
|
+
warpMode: import('../../types').WarpModeEnum;
|
|
67
67
|
mediaDataId?: string | undefined;
|
|
68
68
|
subtitlesId?: string | undefined;
|
|
69
69
|
style?: unknown;
|
|
@@ -84,7 +84,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
84
84
|
startTime: number;
|
|
85
85
|
leftTrim: number;
|
|
86
86
|
rightTrim: number;
|
|
87
|
-
warpMode: import('../../types').
|
|
87
|
+
warpMode: import('../../types').WarpModeEnum;
|
|
88
88
|
mediaDataId?: string | undefined;
|
|
89
89
|
subtitlesId?: string | undefined;
|
|
90
90
|
style?: unknown;
|
|
@@ -138,7 +138,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
138
138
|
startTime: number;
|
|
139
139
|
leftTrim: number;
|
|
140
140
|
rightTrim: number;
|
|
141
|
-
warpMode: import('../../types').
|
|
141
|
+
warpMode: import('../../types').WarpModeEnum;
|
|
142
142
|
mediaDataId?: string | undefined;
|
|
143
143
|
subtitlesId?: string | undefined;
|
|
144
144
|
style?: unknown;
|
|
@@ -174,7 +174,7 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
174
174
|
startTime: number;
|
|
175
175
|
leftTrim: number;
|
|
176
176
|
rightTrim: number;
|
|
177
|
-
warpMode: import('../../types').
|
|
177
|
+
warpMode: import('../../types').WarpModeEnum;
|
|
178
178
|
mediaDataId?: string | undefined;
|
|
179
179
|
subtitlesId?: string | undefined;
|
|
180
180
|
style?: unknown;
|
|
@@ -205,7 +205,7 @@ export declare class Layer {
|
|
|
205
205
|
addClip(options: Clip): Promise<Clip | null>;
|
|
206
206
|
addClip(options: ClipOptions): Promise<Clip | null>;
|
|
207
207
|
removeClip(clipId: string, shouldNotDestroy?: boolean): boolean;
|
|
208
|
-
moveClipToLayer(clipId: string, newLayerId: string):
|
|
208
|
+
moveClipToLayer(clipId: string, newLayerId: string): void;
|
|
209
209
|
splitClip(clipId: string, time: number): Promise<Clip | null>;
|
|
210
210
|
addTransition(transition: Transition): void;
|
|
211
211
|
removeTransition(transitionId: string): void;
|
|
@@ -242,7 +242,7 @@ export declare class Layer {
|
|
|
242
242
|
startTime: number;
|
|
243
243
|
leftTrim: number;
|
|
244
244
|
rightTrim: number;
|
|
245
|
-
warpMode: import('../../types').
|
|
245
|
+
warpMode: import('../../types').WarpModeEnum;
|
|
246
246
|
mediaDataId?: string | undefined;
|
|
247
247
|
subtitlesId?: string | undefined;
|
|
248
248
|
style?: unknown;
|
|
@@ -6,21 +6,22 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
6
6
|
id: z.ZodString;
|
|
7
7
|
type: z.ZodString;
|
|
8
8
|
filename: z.ZodString;
|
|
9
|
-
permanentUrl: z.ZodString
|
|
9
|
+
permanentUrl: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
type: string;
|
|
12
12
|
id: string;
|
|
13
13
|
filename: string;
|
|
14
|
-
permanentUrl
|
|
14
|
+
permanentUrl?: string | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
type: string;
|
|
17
17
|
id: string;
|
|
18
18
|
filename: string;
|
|
19
|
-
permanentUrl
|
|
19
|
+
permanentUrl?: string | undefined;
|
|
20
20
|
}>, "many">;
|
|
21
21
|
subtitles: z.ZodArray<z.ZodObject<{
|
|
22
22
|
id: z.ZodString;
|
|
23
23
|
language: z.ZodString;
|
|
24
|
+
duration: z.ZodNumber;
|
|
24
25
|
textBlocks: z.ZodArray<z.ZodObject<{
|
|
25
26
|
text: z.ZodString;
|
|
26
27
|
time: z.ZodNumber;
|
|
@@ -36,6 +37,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
36
37
|
}>, "many">;
|
|
37
38
|
}, "strip", z.ZodTypeAny, {
|
|
38
39
|
id: string;
|
|
40
|
+
duration: number;
|
|
39
41
|
language: string;
|
|
40
42
|
textBlocks: {
|
|
41
43
|
text: string;
|
|
@@ -44,6 +46,7 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
44
46
|
}[];
|
|
45
47
|
}, {
|
|
46
48
|
id: string;
|
|
49
|
+
duration: number;
|
|
47
50
|
language: string;
|
|
48
51
|
textBlocks: {
|
|
49
52
|
text: string;
|
|
@@ -52,14 +55,9 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
52
55
|
}[];
|
|
53
56
|
}>, "many">;
|
|
54
57
|
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
media: {
|
|
56
|
-
type: string;
|
|
57
|
-
id: string;
|
|
58
|
-
filename: string;
|
|
59
|
-
permanentUrl: string;
|
|
60
|
-
}[];
|
|
61
58
|
subtitles: {
|
|
62
59
|
id: string;
|
|
60
|
+
duration: number;
|
|
63
61
|
language: string;
|
|
64
62
|
textBlocks: {
|
|
65
63
|
text: string;
|
|
@@ -67,15 +65,16 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
67
65
|
duration: number;
|
|
68
66
|
}[];
|
|
69
67
|
}[];
|
|
70
|
-
}, {
|
|
71
68
|
media: {
|
|
72
69
|
type: string;
|
|
73
70
|
id: string;
|
|
74
71
|
filename: string;
|
|
75
|
-
permanentUrl
|
|
72
|
+
permanentUrl?: string | undefined;
|
|
76
73
|
}[];
|
|
74
|
+
}, {
|
|
77
75
|
subtitles: {
|
|
78
76
|
id: string;
|
|
77
|
+
duration: number;
|
|
79
78
|
language: string;
|
|
80
79
|
textBlocks: {
|
|
81
80
|
text: string;
|
|
@@ -83,6 +82,12 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
83
82
|
duration: number;
|
|
84
83
|
}[];
|
|
85
84
|
}[];
|
|
85
|
+
media: {
|
|
86
|
+
type: string;
|
|
87
|
+
id: string;
|
|
88
|
+
filename: string;
|
|
89
|
+
permanentUrl?: string | undefined;
|
|
90
|
+
}[];
|
|
86
91
|
}>;
|
|
87
92
|
export declare class Library {
|
|
88
93
|
media: Record<string, MediaData>;
|
|
@@ -97,14 +102,9 @@ export declare class Library {
|
|
|
97
102
|
removeSubtitles(id: string): void;
|
|
98
103
|
getSubtitlesById(id: string): Subtitles | undefined;
|
|
99
104
|
serialize(): {
|
|
100
|
-
media: {
|
|
101
|
-
type: string;
|
|
102
|
-
id: string;
|
|
103
|
-
filename: string;
|
|
104
|
-
permanentUrl: string;
|
|
105
|
-
}[];
|
|
106
105
|
subtitles: {
|
|
107
106
|
id: string;
|
|
107
|
+
duration: number;
|
|
108
108
|
language: string;
|
|
109
109
|
textBlocks: {
|
|
110
110
|
text: string;
|
|
@@ -112,6 +112,12 @@ export declare class Library {
|
|
|
112
112
|
duration: number;
|
|
113
113
|
}[];
|
|
114
114
|
}[];
|
|
115
|
+
media: {
|
|
116
|
+
type: string;
|
|
117
|
+
id: string;
|
|
118
|
+
filename: string;
|
|
119
|
+
permanentUrl?: string | undefined;
|
|
120
|
+
}[];
|
|
115
121
|
};
|
|
116
122
|
static deserialize(data: object): Library;
|
|
117
123
|
}
|
|
@@ -5,17 +5,17 @@ export declare const MediaDataSchema: z.ZodObject<{
|
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
type: z.ZodString;
|
|
7
7
|
filename: z.ZodString;
|
|
8
|
-
permanentUrl: z.ZodString
|
|
8
|
+
permanentUrl: z.ZodOptional<z.ZodString>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
type: string;
|
|
11
11
|
id: string;
|
|
12
12
|
filename: string;
|
|
13
|
-
permanentUrl
|
|
13
|
+
permanentUrl?: string | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
type: string;
|
|
16
16
|
id: string;
|
|
17
17
|
filename: string;
|
|
18
|
-
permanentUrl
|
|
18
|
+
permanentUrl?: string | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
export declare class MediaData {
|
|
21
21
|
private id;
|
|
@@ -73,11 +73,12 @@ export declare class MediaData {
|
|
|
73
73
|
mimeType?: undefined;
|
|
74
74
|
}>;
|
|
75
75
|
load(file: File | string | Uint8Array, mimeType?: string): Promise<void>;
|
|
76
|
+
setPermanentUrl(url: string | null): void;
|
|
76
77
|
serialize(): {
|
|
77
78
|
type: string;
|
|
78
79
|
id: string;
|
|
79
80
|
filename: string;
|
|
80
|
-
permanentUrl
|
|
81
|
+
permanentUrl?: string | undefined;
|
|
81
82
|
};
|
|
82
83
|
static deserialize(data: object): MediaData;
|
|
83
84
|
}
|
|
@@ -15,6 +15,7 @@ export declare const TextBlockSchema: z.ZodObject<{
|
|
|
15
15
|
export declare const SubtitlesSchema: z.ZodObject<{
|
|
16
16
|
id: z.ZodString;
|
|
17
17
|
language: z.ZodString;
|
|
18
|
+
duration: z.ZodNumber;
|
|
18
19
|
textBlocks: z.ZodArray<z.ZodObject<{
|
|
19
20
|
text: z.ZodString;
|
|
20
21
|
time: z.ZodNumber;
|
|
@@ -30,6 +31,7 @@ export declare const SubtitlesSchema: z.ZodObject<{
|
|
|
30
31
|
}>, "many">;
|
|
31
32
|
}, "strip", z.ZodTypeAny, {
|
|
32
33
|
id: string;
|
|
34
|
+
duration: number;
|
|
33
35
|
language: string;
|
|
34
36
|
textBlocks: {
|
|
35
37
|
text: string;
|
|
@@ -38,6 +40,7 @@ export declare const SubtitlesSchema: z.ZodObject<{
|
|
|
38
40
|
}[];
|
|
39
41
|
}, {
|
|
40
42
|
id: string;
|
|
43
|
+
duration: number;
|
|
41
44
|
language: string;
|
|
42
45
|
textBlocks: {
|
|
43
46
|
text: string;
|
|
@@ -50,15 +53,32 @@ export interface TextBlock {
|
|
|
50
53
|
time: number;
|
|
51
54
|
duration: number;
|
|
52
55
|
}
|
|
56
|
+
interface SubtitlesOptions {
|
|
57
|
+
language?: string;
|
|
58
|
+
duration?: number;
|
|
59
|
+
textBlocks?: TextBlock[];
|
|
60
|
+
}
|
|
53
61
|
export declare class Subtitles {
|
|
54
62
|
protected id: string;
|
|
55
63
|
protected language: string;
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
protected duration: number;
|
|
65
|
+
protected textBlocks: TextBlock[];
|
|
66
|
+
constructor(options?: SubtitlesOptions);
|
|
58
67
|
getId(): string;
|
|
59
68
|
getLanguage(): string;
|
|
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;
|
|
76
|
+
setDuration(duration: number): void;
|
|
77
|
+
fitDurationToBlocks(): void;
|
|
78
|
+
validateTextBlocks(): void;
|
|
60
79
|
serialize(): {
|
|
61
80
|
id: string;
|
|
81
|
+
duration: number;
|
|
62
82
|
language: string;
|
|
63
83
|
textBlocks: {
|
|
64
84
|
text: string;
|
|
@@ -69,3 +89,4 @@ export declare class Subtitles {
|
|
|
69
89
|
static deserialize(data: object): Subtitles;
|
|
70
90
|
clone(): Subtitles;
|
|
71
91
|
}
|
|
92
|
+
export {};
|