@rendley/sdk 1.0.1
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/LICENSE +48 -0
- package/README.md +40 -0
- package/dist/Engine.d.ts +118 -0
- package/dist/config/config.d.ts +6 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/libs/ffmpeg/classes.d.ts +201 -0
- package/dist/libs/ffmpeg/config.d.ts +2 -0
- package/dist/libs/ffmpeg/const.d.ts +37 -0
- package/dist/libs/ffmpeg/empty.d.mts +3 -0
- package/dist/libs/ffmpeg/errors.d.ts +4 -0
- package/dist/libs/ffmpeg/fetchFile.d.ts +1 -0
- package/dist/libs/ffmpeg/index.d.ts +1 -0
- package/dist/libs/ffmpeg/types.d.ts +175 -0
- package/dist/libs/ffmpeg/utils.d.ts +4 -0
- package/dist/libs/ffmpeg/worker.d.ts +10 -0
- package/dist/modules/clip/Clip.d.ts +206 -0
- package/dist/modules/clip/ClipStyle.d.ts +92 -0
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +36 -0
- package/dist/modules/clip/clips/gif/GifClip.d.ts +27 -0
- package/dist/modules/clip/clips/image/ImageClip.d.ts +16 -0
- package/dist/modules/clip/clips/index.d.ts +4 -0
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +43 -0
- package/dist/modules/clip/clips/shape/ShapeSprite.d.ts +9 -0
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +27 -0
- package/dist/modules/clip/clips/text/TextClip.d.ts +42 -0
- package/dist/modules/clip/clips/text/TextSprite.d.ts +7 -0
- package/dist/modules/clip/clips/text/TextStyle.d.ts +69 -0
- package/dist/modules/clip/clips/video/VideoClip.d.ts +48 -0
- package/dist/modules/clip/index.d.ts +2 -0
- package/dist/modules/clip/utils/generateRawData.d.ts +1 -0
- package/dist/modules/display/Display.d.ts +42 -0
- package/dist/modules/display/index.d.ts +1 -0
- package/dist/modules/display/renderer/PixiRenderer.d.ts +16 -0
- package/dist/modules/display/utils/WebCodecsVideoFrameResource.d.ts +7 -0
- package/dist/modules/display/utils/registerSelectionEvents.d.ts +12 -0
- package/dist/modules/event-emitter/EventEmitter.d.ts +4 -0
- package/dist/modules/event-emitter/index.d.ts +2 -0
- package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +179 -0
- package/dist/modules/ffmpeg/FFmpeg.d.ts +11 -0
- package/dist/modules/ffmpeg/types/FFmpeg.types.d.ts +32 -0
- package/dist/modules/filter/Effect.d.ts +36 -0
- package/dist/modules/filter/Filter.d.ts +52 -0
- package/dist/modules/filter/effects/OldFilmEffect.d.ts +2 -0
- package/dist/modules/filter/effects/WaveEffect.d.ts +2 -0
- package/dist/modules/filter/filters/VintageFilter.d.ts +2 -0
- package/dist/modules/filter/index.d.ts +2 -0
- package/dist/modules/filter/utils/removeShaderNameLine.d.ts +1 -0
- package/dist/modules/font-registry/FontRegistry.d.ts +22 -0
- package/dist/modules/font-registry/index.d.ts +1 -0
- package/dist/modules/layer/Layer.d.ts +278 -0
- package/dist/modules/layer/index.d.ts +1 -0
- package/dist/modules/library/Library.d.ts +117 -0
- package/dist/modules/library/MediaData.d.ts +50 -0
- package/dist/modules/library/Subtitles.d.ts +71 -0
- package/dist/modules/library/index.d.ts +1 -0
- package/dist/modules/library/types/MediaData.types.d.ts +7 -0
- package/dist/modules/subtitleManager/SubtitleManager.d.ts +9 -0
- package/dist/modules/subtitleManager/index.d.ts +1 -0
- package/dist/modules/timeline/Timeline.d.ts +372 -0
- package/dist/modules/timeline/index.d.ts +1 -0
- package/dist/modules/transition/Transition.d.ts +76 -0
- package/dist/modules/transition/index.d.ts +1 -0
- package/dist/types/clip.types.d.ts +18 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/browser/getIosVersion.d.ts +1 -0
- package/dist/utils/browser/isIos.d.ts +1 -0
- package/dist/utils/browser/isIosSafari.d.ts +1 -0
- package/dist/utils/color/getSolidColorFromGradient.d.ts +1 -0
- package/dist/utils/color/parseGradient.d.ts +7 -0
- package/dist/utils/core/emitEvent.d.ts +4 -0
- package/dist/utils/file/fileToArrayBuffer.d.ts +1 -0
- package/dist/utils/file/getFilenameFromResponse.d.ts +1 -0
- package/dist/utils/file/toBlobURL.d.ts +1 -0
- package/dist/utils/log.d.ts +7 -0
- package/dist/utils/math/calculateFitScale.d.ts +1 -0
- package/dist/utils/math/clampValue.d.ts +1 -0
- package/dist/utils/texture/createGradientTexture.d.ts +2 -0
- package/package.json +75 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MediaData } from './MediaData';
|
|
3
|
+
import { Subtitles } from './Subtitles';
|
|
4
|
+
export declare const LibrarySchema: z.ZodObject<{
|
|
5
|
+
media: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
type: z.ZodString;
|
|
8
|
+
filename: z.ZodString;
|
|
9
|
+
permanentUrl: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: string;
|
|
12
|
+
id: string;
|
|
13
|
+
filename: string;
|
|
14
|
+
permanentUrl: string;
|
|
15
|
+
}, {
|
|
16
|
+
type: string;
|
|
17
|
+
id: string;
|
|
18
|
+
filename: string;
|
|
19
|
+
permanentUrl: string;
|
|
20
|
+
}>, "many">;
|
|
21
|
+
subtitles: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
language: z.ZodString;
|
|
24
|
+
textBlocks: z.ZodArray<z.ZodObject<{
|
|
25
|
+
text: z.ZodString;
|
|
26
|
+
time: z.ZodNumber;
|
|
27
|
+
duration: z.ZodNumber;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
text: string;
|
|
30
|
+
time: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
}, {
|
|
33
|
+
text: string;
|
|
34
|
+
time: number;
|
|
35
|
+
duration: number;
|
|
36
|
+
}>, "many">;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
id: string;
|
|
39
|
+
language: string;
|
|
40
|
+
textBlocks: {
|
|
41
|
+
text: string;
|
|
42
|
+
time: number;
|
|
43
|
+
duration: number;
|
|
44
|
+
}[];
|
|
45
|
+
}, {
|
|
46
|
+
id: string;
|
|
47
|
+
language: string;
|
|
48
|
+
textBlocks: {
|
|
49
|
+
text: string;
|
|
50
|
+
time: number;
|
|
51
|
+
duration: number;
|
|
52
|
+
}[];
|
|
53
|
+
}>, "many">;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
media: {
|
|
56
|
+
type: string;
|
|
57
|
+
id: string;
|
|
58
|
+
filename: string;
|
|
59
|
+
permanentUrl: string;
|
|
60
|
+
}[];
|
|
61
|
+
subtitles: {
|
|
62
|
+
id: string;
|
|
63
|
+
language: string;
|
|
64
|
+
textBlocks: {
|
|
65
|
+
text: string;
|
|
66
|
+
time: number;
|
|
67
|
+
duration: number;
|
|
68
|
+
}[];
|
|
69
|
+
}[];
|
|
70
|
+
}, {
|
|
71
|
+
media: {
|
|
72
|
+
type: string;
|
|
73
|
+
id: string;
|
|
74
|
+
filename: string;
|
|
75
|
+
permanentUrl: string;
|
|
76
|
+
}[];
|
|
77
|
+
subtitles: {
|
|
78
|
+
id: string;
|
|
79
|
+
language: string;
|
|
80
|
+
textBlocks: {
|
|
81
|
+
text: string;
|
|
82
|
+
time: number;
|
|
83
|
+
duration: number;
|
|
84
|
+
}[];
|
|
85
|
+
}[];
|
|
86
|
+
}>;
|
|
87
|
+
export declare class Library {
|
|
88
|
+
media: Record<string, MediaData>;
|
|
89
|
+
subtitles: Record<string, Subtitles>;
|
|
90
|
+
constructor();
|
|
91
|
+
init(): Promise<void>;
|
|
92
|
+
destroy(): void;
|
|
93
|
+
getMediaById(id: string): MediaData | undefined;
|
|
94
|
+
addMedia(file: File | string | Uint8Array, mimeType?: string): Promise<string | null>;
|
|
95
|
+
deleteMedia(id: string): Promise<void>;
|
|
96
|
+
addSubtitles(subtitles: Subtitles): string;
|
|
97
|
+
removeSubtitles(id: string): void;
|
|
98
|
+
getSubtitlesById(id: string): Subtitles | undefined;
|
|
99
|
+
serialize(): {
|
|
100
|
+
media: {
|
|
101
|
+
type: string;
|
|
102
|
+
id: string;
|
|
103
|
+
filename: string;
|
|
104
|
+
permanentUrl: string;
|
|
105
|
+
}[];
|
|
106
|
+
subtitles: {
|
|
107
|
+
id: string;
|
|
108
|
+
language: string;
|
|
109
|
+
textBlocks: {
|
|
110
|
+
text: string;
|
|
111
|
+
time: number;
|
|
112
|
+
duration: number;
|
|
113
|
+
}[];
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
static deserialize(data: object): Library;
|
|
117
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MediaDataStatus } from './types/MediaData.types';
|
|
3
|
+
import { MediaInfo } from '../ffmpeg/types/FFmpeg.types';
|
|
4
|
+
export declare const MediaDataSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
type: z.ZodString;
|
|
7
|
+
filename: z.ZodString;
|
|
8
|
+
permanentUrl: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
type: string;
|
|
11
|
+
id: string;
|
|
12
|
+
filename: string;
|
|
13
|
+
permanentUrl: string;
|
|
14
|
+
}, {
|
|
15
|
+
type: string;
|
|
16
|
+
id: string;
|
|
17
|
+
filename: string;
|
|
18
|
+
permanentUrl: string;
|
|
19
|
+
}>;
|
|
20
|
+
export declare class MediaData {
|
|
21
|
+
private id;
|
|
22
|
+
status?: MediaDataStatus;
|
|
23
|
+
thumbnail?: string;
|
|
24
|
+
filmstrip?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
filename?: string;
|
|
27
|
+
width?: number;
|
|
28
|
+
height?: number;
|
|
29
|
+
duration?: number;
|
|
30
|
+
blobUrl?: string;
|
|
31
|
+
data?: Uint8Array;
|
|
32
|
+
metadata?: MediaInfo;
|
|
33
|
+
storePath?: string;
|
|
34
|
+
audioSplit?: string;
|
|
35
|
+
permanentUrl?: string;
|
|
36
|
+
constructor();
|
|
37
|
+
init(): Promise<void>;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
getId(): string;
|
|
40
|
+
readFileIntoBlob(file: File, mimeType?: string): Promise<Blob>;
|
|
41
|
+
checkCompatibilityOrTranscode(filePath: string, blobUrl: string, hasAudio: boolean): Promise<boolean>;
|
|
42
|
+
load(file: File | string | Uint8Array, mimeType?: string): Promise<void>;
|
|
43
|
+
serialize(): {
|
|
44
|
+
type: string;
|
|
45
|
+
id: string;
|
|
46
|
+
filename: string;
|
|
47
|
+
permanentUrl: string;
|
|
48
|
+
};
|
|
49
|
+
static deserialize(data: object): MediaData;
|
|
50
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TextBlockSchema: z.ZodObject<{
|
|
3
|
+
text: z.ZodString;
|
|
4
|
+
time: z.ZodNumber;
|
|
5
|
+
duration: z.ZodNumber;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
text: string;
|
|
8
|
+
time: number;
|
|
9
|
+
duration: number;
|
|
10
|
+
}, {
|
|
11
|
+
text: string;
|
|
12
|
+
time: number;
|
|
13
|
+
duration: number;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const SubtitlesSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
language: z.ZodString;
|
|
18
|
+
textBlocks: z.ZodArray<z.ZodObject<{
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
time: z.ZodNumber;
|
|
21
|
+
duration: z.ZodNumber;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
text: string;
|
|
24
|
+
time: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
}, {
|
|
27
|
+
text: string;
|
|
28
|
+
time: number;
|
|
29
|
+
duration: number;
|
|
30
|
+
}>, "many">;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
id: string;
|
|
33
|
+
language: string;
|
|
34
|
+
textBlocks: {
|
|
35
|
+
text: string;
|
|
36
|
+
time: number;
|
|
37
|
+
duration: number;
|
|
38
|
+
}[];
|
|
39
|
+
}, {
|
|
40
|
+
id: string;
|
|
41
|
+
language: string;
|
|
42
|
+
textBlocks: {
|
|
43
|
+
text: string;
|
|
44
|
+
time: number;
|
|
45
|
+
duration: number;
|
|
46
|
+
}[];
|
|
47
|
+
}>;
|
|
48
|
+
export interface TextBlock {
|
|
49
|
+
text: string;
|
|
50
|
+
time: number;
|
|
51
|
+
duration: number;
|
|
52
|
+
}
|
|
53
|
+
export declare class Subtitles {
|
|
54
|
+
protected id: string;
|
|
55
|
+
protected language: string;
|
|
56
|
+
textBlocks: TextBlock[];
|
|
57
|
+
constructor();
|
|
58
|
+
getId(): string;
|
|
59
|
+
getLanguage(): string;
|
|
60
|
+
serialize(): {
|
|
61
|
+
id: string;
|
|
62
|
+
language: string;
|
|
63
|
+
textBlocks: {
|
|
64
|
+
text: string;
|
|
65
|
+
time: number;
|
|
66
|
+
duration: number;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
static deserialize(data: object): Subtitles;
|
|
70
|
+
clone(): Subtitles;
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Library';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Subtitles } from '../library/Subtitles';
|
|
2
|
+
export declare class SubtitleManager {
|
|
3
|
+
private textContainer;
|
|
4
|
+
constructor();
|
|
5
|
+
init(): void;
|
|
6
|
+
update(currentTime: number): void;
|
|
7
|
+
convertSRTToSubtitles(srt: string): Subtitles;
|
|
8
|
+
extractSubtitlesFromVideo(mediaDataId: string): Promise<string> | "";
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SubtitleManager';
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Clip } from '../clip';
|
|
3
|
+
import { Layer } from '../layer';
|
|
4
|
+
export declare const TimelineSchema: z.ZodObject<{
|
|
5
|
+
startTime: z.ZodNumber;
|
|
6
|
+
duration: z.ZodNumber;
|
|
7
|
+
fps: z.ZodNumber;
|
|
8
|
+
layers: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
isEnabled: z.ZodBoolean;
|
|
11
|
+
isMuted: z.ZodBoolean;
|
|
12
|
+
clips: z.ZodArray<z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
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
|
+
name: z.ZodString;
|
|
26
|
+
sourceId: z.ZodString;
|
|
27
|
+
options: z.ZodObject<{
|
|
28
|
+
lutUrl: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
lutUrl: string;
|
|
31
|
+
}, {
|
|
32
|
+
lutUrl: string;
|
|
33
|
+
}>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
name: string;
|
|
36
|
+
options: {
|
|
37
|
+
lutUrl: string;
|
|
38
|
+
};
|
|
39
|
+
id: string;
|
|
40
|
+
sourceId: string;
|
|
41
|
+
}, {
|
|
42
|
+
name: string;
|
|
43
|
+
options: {
|
|
44
|
+
lutUrl: string;
|
|
45
|
+
};
|
|
46
|
+
id: string;
|
|
47
|
+
sourceId: string;
|
|
48
|
+
}>, "many">;
|
|
49
|
+
effects: z.ZodArray<z.ZodUnknown, "many">;
|
|
50
|
+
warpMode: z.ZodNativeEnum<typeof import("../..").WarmModeEnum>;
|
|
51
|
+
style: z.ZodUnknown;
|
|
52
|
+
text: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
type: string;
|
|
56
|
+
id: string;
|
|
57
|
+
duration: number;
|
|
58
|
+
filters: {
|
|
59
|
+
name: string;
|
|
60
|
+
options: {
|
|
61
|
+
lutUrl: string;
|
|
62
|
+
};
|
|
63
|
+
id: string;
|
|
64
|
+
sourceId: string;
|
|
65
|
+
}[];
|
|
66
|
+
effects: unknown[];
|
|
67
|
+
subtitlesOffset: number;
|
|
68
|
+
startTime: number;
|
|
69
|
+
leftTrim: number;
|
|
70
|
+
rightTrim: number;
|
|
71
|
+
warpMode: import("../..").WarmModeEnum;
|
|
72
|
+
mediaDataId?: string | undefined;
|
|
73
|
+
subtitlesId?: string | undefined;
|
|
74
|
+
style?: unknown;
|
|
75
|
+
text?: string | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
name: string;
|
|
78
|
+
type: string;
|
|
79
|
+
id: string;
|
|
80
|
+
duration: number;
|
|
81
|
+
filters: {
|
|
82
|
+
name: string;
|
|
83
|
+
options: {
|
|
84
|
+
lutUrl: string;
|
|
85
|
+
};
|
|
86
|
+
id: string;
|
|
87
|
+
sourceId: string;
|
|
88
|
+
}[];
|
|
89
|
+
effects: unknown[];
|
|
90
|
+
subtitlesOffset: number;
|
|
91
|
+
startTime: number;
|
|
92
|
+
leftTrim: number;
|
|
93
|
+
rightTrim: number;
|
|
94
|
+
warpMode: import("../..").WarmModeEnum;
|
|
95
|
+
mediaDataId?: string | undefined;
|
|
96
|
+
subtitlesId?: string | undefined;
|
|
97
|
+
style?: unknown;
|
|
98
|
+
text?: string | undefined;
|
|
99
|
+
}>, "many">;
|
|
100
|
+
transitions: z.ZodArray<z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
startClipId: z.ZodString;
|
|
104
|
+
endClipId: z.ZodString;
|
|
105
|
+
inDuration: z.ZodNumber;
|
|
106
|
+
outDuration: z.ZodNumber;
|
|
107
|
+
transitionSrc: z.ZodString;
|
|
108
|
+
type: z.ZodLiteral<"transition">;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
name: string;
|
|
111
|
+
type: "transition";
|
|
112
|
+
id: string;
|
|
113
|
+
startClipId: string;
|
|
114
|
+
endClipId: string;
|
|
115
|
+
inDuration: number;
|
|
116
|
+
outDuration: number;
|
|
117
|
+
transitionSrc: string;
|
|
118
|
+
}, {
|
|
119
|
+
name: string;
|
|
120
|
+
type: "transition";
|
|
121
|
+
id: string;
|
|
122
|
+
startClipId: string;
|
|
123
|
+
endClipId: string;
|
|
124
|
+
inDuration: number;
|
|
125
|
+
outDuration: number;
|
|
126
|
+
transitionSrc: string;
|
|
127
|
+
}>, "many">;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
id: string;
|
|
130
|
+
isEnabled: boolean;
|
|
131
|
+
isMuted: boolean;
|
|
132
|
+
clips: {
|
|
133
|
+
name: string;
|
|
134
|
+
type: string;
|
|
135
|
+
id: string;
|
|
136
|
+
duration: number;
|
|
137
|
+
filters: {
|
|
138
|
+
name: string;
|
|
139
|
+
options: {
|
|
140
|
+
lutUrl: string;
|
|
141
|
+
};
|
|
142
|
+
id: string;
|
|
143
|
+
sourceId: string;
|
|
144
|
+
}[];
|
|
145
|
+
effects: unknown[];
|
|
146
|
+
subtitlesOffset: number;
|
|
147
|
+
startTime: number;
|
|
148
|
+
leftTrim: number;
|
|
149
|
+
rightTrim: number;
|
|
150
|
+
warpMode: import("../..").WarmModeEnum;
|
|
151
|
+
mediaDataId?: string | undefined;
|
|
152
|
+
subtitlesId?: string | undefined;
|
|
153
|
+
style?: unknown;
|
|
154
|
+
text?: string | undefined;
|
|
155
|
+
}[];
|
|
156
|
+
transitions: {
|
|
157
|
+
name: string;
|
|
158
|
+
type: "transition";
|
|
159
|
+
id: string;
|
|
160
|
+
startClipId: string;
|
|
161
|
+
endClipId: string;
|
|
162
|
+
inDuration: number;
|
|
163
|
+
outDuration: number;
|
|
164
|
+
transitionSrc: string;
|
|
165
|
+
}[];
|
|
166
|
+
}, {
|
|
167
|
+
id: string;
|
|
168
|
+
isEnabled: boolean;
|
|
169
|
+
isMuted: boolean;
|
|
170
|
+
clips: {
|
|
171
|
+
name: string;
|
|
172
|
+
type: string;
|
|
173
|
+
id: string;
|
|
174
|
+
duration: number;
|
|
175
|
+
filters: {
|
|
176
|
+
name: string;
|
|
177
|
+
options: {
|
|
178
|
+
lutUrl: string;
|
|
179
|
+
};
|
|
180
|
+
id: string;
|
|
181
|
+
sourceId: string;
|
|
182
|
+
}[];
|
|
183
|
+
effects: unknown[];
|
|
184
|
+
subtitlesOffset: number;
|
|
185
|
+
startTime: number;
|
|
186
|
+
leftTrim: number;
|
|
187
|
+
rightTrim: number;
|
|
188
|
+
warpMode: import("../..").WarmModeEnum;
|
|
189
|
+
mediaDataId?: string | undefined;
|
|
190
|
+
subtitlesId?: string | undefined;
|
|
191
|
+
style?: unknown;
|
|
192
|
+
text?: string | undefined;
|
|
193
|
+
}[];
|
|
194
|
+
transitions: {
|
|
195
|
+
name: string;
|
|
196
|
+
type: "transition";
|
|
197
|
+
id: string;
|
|
198
|
+
startClipId: string;
|
|
199
|
+
endClipId: string;
|
|
200
|
+
inDuration: number;
|
|
201
|
+
outDuration: number;
|
|
202
|
+
transitionSrc: string;
|
|
203
|
+
}[];
|
|
204
|
+
}>, "many">;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
duration: number;
|
|
207
|
+
startTime: number;
|
|
208
|
+
fps: number;
|
|
209
|
+
layers: {
|
|
210
|
+
id: string;
|
|
211
|
+
isEnabled: boolean;
|
|
212
|
+
isMuted: boolean;
|
|
213
|
+
clips: {
|
|
214
|
+
name: string;
|
|
215
|
+
type: string;
|
|
216
|
+
id: string;
|
|
217
|
+
duration: number;
|
|
218
|
+
filters: {
|
|
219
|
+
name: string;
|
|
220
|
+
options: {
|
|
221
|
+
lutUrl: string;
|
|
222
|
+
};
|
|
223
|
+
id: string;
|
|
224
|
+
sourceId: string;
|
|
225
|
+
}[];
|
|
226
|
+
effects: unknown[];
|
|
227
|
+
subtitlesOffset: number;
|
|
228
|
+
startTime: number;
|
|
229
|
+
leftTrim: number;
|
|
230
|
+
rightTrim: number;
|
|
231
|
+
warpMode: import("../..").WarmModeEnum;
|
|
232
|
+
mediaDataId?: string | undefined;
|
|
233
|
+
subtitlesId?: string | undefined;
|
|
234
|
+
style?: unknown;
|
|
235
|
+
text?: string | undefined;
|
|
236
|
+
}[];
|
|
237
|
+
transitions: {
|
|
238
|
+
name: string;
|
|
239
|
+
type: "transition";
|
|
240
|
+
id: string;
|
|
241
|
+
startClipId: string;
|
|
242
|
+
endClipId: string;
|
|
243
|
+
inDuration: number;
|
|
244
|
+
outDuration: number;
|
|
245
|
+
transitionSrc: string;
|
|
246
|
+
}[];
|
|
247
|
+
}[];
|
|
248
|
+
}, {
|
|
249
|
+
duration: number;
|
|
250
|
+
startTime: number;
|
|
251
|
+
fps: number;
|
|
252
|
+
layers: {
|
|
253
|
+
id: string;
|
|
254
|
+
isEnabled: boolean;
|
|
255
|
+
isMuted: boolean;
|
|
256
|
+
clips: {
|
|
257
|
+
name: string;
|
|
258
|
+
type: string;
|
|
259
|
+
id: string;
|
|
260
|
+
duration: number;
|
|
261
|
+
filters: {
|
|
262
|
+
name: string;
|
|
263
|
+
options: {
|
|
264
|
+
lutUrl: string;
|
|
265
|
+
};
|
|
266
|
+
id: string;
|
|
267
|
+
sourceId: string;
|
|
268
|
+
}[];
|
|
269
|
+
effects: unknown[];
|
|
270
|
+
subtitlesOffset: number;
|
|
271
|
+
startTime: number;
|
|
272
|
+
leftTrim: number;
|
|
273
|
+
rightTrim: number;
|
|
274
|
+
warpMode: import("../..").WarmModeEnum;
|
|
275
|
+
mediaDataId?: string | undefined;
|
|
276
|
+
subtitlesId?: string | undefined;
|
|
277
|
+
style?: unknown;
|
|
278
|
+
text?: string | undefined;
|
|
279
|
+
}[];
|
|
280
|
+
transitions: {
|
|
281
|
+
name: string;
|
|
282
|
+
type: "transition";
|
|
283
|
+
id: string;
|
|
284
|
+
startClipId: string;
|
|
285
|
+
endClipId: string;
|
|
286
|
+
inDuration: number;
|
|
287
|
+
outDuration: number;
|
|
288
|
+
transitionSrc: string;
|
|
289
|
+
}[];
|
|
290
|
+
}[];
|
|
291
|
+
}>;
|
|
292
|
+
export declare class Timeline {
|
|
293
|
+
private startTime;
|
|
294
|
+
duration: number;
|
|
295
|
+
layers: Record<string, Layer>;
|
|
296
|
+
layersOrder: string[];
|
|
297
|
+
fps: number;
|
|
298
|
+
currentTime: number;
|
|
299
|
+
isPlaying: boolean;
|
|
300
|
+
private justStartedPlaying;
|
|
301
|
+
constructor();
|
|
302
|
+
init(): void;
|
|
303
|
+
destroy(): void;
|
|
304
|
+
addMedia(file: File): Promise<string | null>;
|
|
305
|
+
createLayer(options?: {
|
|
306
|
+
index?: number;
|
|
307
|
+
}): Layer;
|
|
308
|
+
getLayerById(layerId: string): Layer | undefined;
|
|
309
|
+
getLayerByClipId(clipId: string): Layer | undefined;
|
|
310
|
+
getClipById(clipId: string): Clip | undefined;
|
|
311
|
+
getClipsByMediaId(mediaId: string): Clip[];
|
|
312
|
+
getClipsBySubtitlesId(subtitlesId: string): Clip[];
|
|
313
|
+
play(): Promise<void>;
|
|
314
|
+
pause(): void;
|
|
315
|
+
stop(): void;
|
|
316
|
+
seek(value: number): void;
|
|
317
|
+
getClips(): Clip[];
|
|
318
|
+
getIsProcessing(): boolean;
|
|
319
|
+
setSubtitles(subtitlesId: string, offset: number, clipIds?: string[]): void;
|
|
320
|
+
removeClip(clipId: string): boolean;
|
|
321
|
+
removeLayer(layerId: string): boolean;
|
|
322
|
+
moveClipToLayer(clipId: string, newLayerId: string): void;
|
|
323
|
+
alignTime(time: number): number;
|
|
324
|
+
adjustClipsLayout(): void;
|
|
325
|
+
getFitDuration(): number;
|
|
326
|
+
render(): Promise<void>;
|
|
327
|
+
serialize(): {
|
|
328
|
+
duration: number;
|
|
329
|
+
startTime: number;
|
|
330
|
+
fps: number;
|
|
331
|
+
layers: {
|
|
332
|
+
id: string;
|
|
333
|
+
isEnabled: boolean;
|
|
334
|
+
isMuted: boolean;
|
|
335
|
+
clips: {
|
|
336
|
+
name: string;
|
|
337
|
+
type: string;
|
|
338
|
+
id: string;
|
|
339
|
+
duration: number;
|
|
340
|
+
filters: {
|
|
341
|
+
name: string;
|
|
342
|
+
options: {
|
|
343
|
+
lutUrl: string;
|
|
344
|
+
};
|
|
345
|
+
id: string;
|
|
346
|
+
sourceId: string;
|
|
347
|
+
}[];
|
|
348
|
+
effects: unknown[];
|
|
349
|
+
subtitlesOffset: number;
|
|
350
|
+
startTime: number;
|
|
351
|
+
leftTrim: number;
|
|
352
|
+
rightTrim: number;
|
|
353
|
+
warpMode: import("../..").WarmModeEnum;
|
|
354
|
+
mediaDataId?: string | undefined;
|
|
355
|
+
subtitlesId?: string | undefined;
|
|
356
|
+
style?: unknown;
|
|
357
|
+
text?: string | undefined;
|
|
358
|
+
}[];
|
|
359
|
+
transitions: {
|
|
360
|
+
name: string;
|
|
361
|
+
type: "transition";
|
|
362
|
+
id: string;
|
|
363
|
+
startClipId: string;
|
|
364
|
+
endClipId: string;
|
|
365
|
+
inDuration: number;
|
|
366
|
+
outDuration: number;
|
|
367
|
+
transitionSrc: string;
|
|
368
|
+
}[];
|
|
369
|
+
}[];
|
|
370
|
+
};
|
|
371
|
+
static deserialize(data: object): Timeline;
|
|
372
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Timeline';
|