@rendley/sdk 1.2.2 → 1.4.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 +65 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/libs/ffmpeg/classes.d.ts +1 -0
- package/dist/libs/ffmpeg/const.d.ts +2 -1
- package/dist/modules/clip/Clip.d.ts +27 -16
- package/dist/modules/clip/ClipStyle.d.ts +1 -0
- package/dist/modules/clip/clips/custom/CustomClip.d.ts +6 -5
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +6 -5
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +6 -5
- package/dist/modules/clip/clips/text/TextClip.d.ts +6 -6
- package/dist/modules/clip/clips/text/TextStyle.d.ts +6 -10
- package/dist/modules/layer/Layer.d.ts +2 -2
- package/dist/modules/library/Library.d.ts +19 -0
- package/dist/modules/library/MediaData.d.ts +28 -1
- package/dist/modules/settings/Settings.d.ts +29 -0
- package/dist/modules/settings/index.d.ts +1 -0
- package/dist/modules/storage/StorageController.d.ts +17 -0
- package/dist/modules/storage/StorageProviderBase.d.ts +33 -0
- package/dist/modules/storage/index.d.ts +3 -0
- package/dist/modules/storage/providers/StorageIndexedDB.d.ts +20 -0
- package/dist/modules/subtitleManager/SubtitleManager.d.ts +238 -1
- package/dist/modules/timeline/Timeline.d.ts +4 -0
- package/dist/types/text.types.d.ts +7 -0
- package/dist/utils/animation/animation.d.ts +2 -0
- package/dist/utils/cachedAccess/cachedAccess.d.ts +18 -0
- package/dist/utils/file/uint8ArrayToHex.d.ts +1 -0
- package/dist/utils/math/degToRad.d.ts +1 -0
- package/dist/utils/math/radToDeg.d.ts +1 -0
- package/package.json +1 -1
package/dist/Engine.d.ts
CHANGED
|
@@ -4,15 +4,33 @@ import { Display, DisplayOptions } from "./modules/display/Display";
|
|
|
4
4
|
import { EventEmitter } from "./modules/event-emitter";
|
|
5
5
|
import { FontRegistry } from "./modules/font-registry";
|
|
6
6
|
import { Library } from "./modules/library";
|
|
7
|
-
import {
|
|
7
|
+
import { Settings } from "./modules/settings";
|
|
8
|
+
import { StorageProviderBase } from "./modules/storage";
|
|
9
|
+
import { StorageController } from "./modules/storage/StorageController";
|
|
10
|
+
import { SubtitlesManager } from "./modules/subtitleManager";
|
|
8
11
|
import { Timeline } from "./modules/timeline/Timeline";
|
|
12
|
+
export declare enum ExportVideoType {
|
|
13
|
+
VIDEO_ONLY = "video_only",
|
|
14
|
+
AUDIO_ONLY = "audio_only",
|
|
15
|
+
VIDEO_AUDIO = "video_audio"
|
|
16
|
+
}
|
|
9
17
|
interface EngineLicense {
|
|
10
18
|
licenseName: string;
|
|
11
19
|
licenseKey: string;
|
|
12
20
|
}
|
|
21
|
+
interface ExportResult {
|
|
22
|
+
blob: Blob;
|
|
23
|
+
extension: "aac" | "mp4";
|
|
24
|
+
}
|
|
25
|
+
interface ExportOptions {
|
|
26
|
+
type?: ExportVideoType;
|
|
27
|
+
from?: number;
|
|
28
|
+
to?: number;
|
|
29
|
+
}
|
|
13
30
|
export interface EngineOptions {
|
|
14
31
|
display?: DisplayOptions;
|
|
15
32
|
license?: EngineLicense;
|
|
33
|
+
storages?: StorageProviderBase[];
|
|
16
34
|
}
|
|
17
35
|
type CustomClipConstructor<T extends CustomClip = CustomClip> = {
|
|
18
36
|
new (...args: any[]): T;
|
|
@@ -23,25 +41,32 @@ export declare class Engine {
|
|
|
23
41
|
private timeline;
|
|
24
42
|
private library;
|
|
25
43
|
private fontRegistry;
|
|
26
|
-
private
|
|
44
|
+
private subtitlesManager;
|
|
45
|
+
private storageController;
|
|
46
|
+
private settings;
|
|
27
47
|
readonly events: EventEmitter;
|
|
28
48
|
private initialized;
|
|
29
49
|
private rendering;
|
|
30
50
|
private license?;
|
|
51
|
+
private projectId;
|
|
31
52
|
private constructor();
|
|
32
53
|
static getInstance(): Engine;
|
|
54
|
+
hasInstance(): boolean;
|
|
33
55
|
getFFmpeg(): import("./libs/ffmpeg").FFmpeg;
|
|
34
56
|
init(options: EngineOptions): Promise<void>;
|
|
35
57
|
destroy(): void;
|
|
58
|
+
getProjectId(): string;
|
|
36
59
|
getDisplay(): Display;
|
|
37
60
|
getTimeline(): Timeline;
|
|
38
61
|
getLibrary(): Library;
|
|
62
|
+
getSettings(): Settings;
|
|
39
63
|
getFontRegistry(): FontRegistry;
|
|
40
|
-
getSubtitlesManager():
|
|
64
|
+
getSubtitlesManager(): SubtitlesManager;
|
|
65
|
+
getStorageController(): StorageController;
|
|
41
66
|
isInitialized(): boolean;
|
|
42
67
|
isRendering(): boolean;
|
|
43
68
|
private generateMix;
|
|
44
|
-
export(
|
|
69
|
+
export(payload?: ExportOptions): Promise<ExportResult>;
|
|
45
70
|
play(): Promise<void>;
|
|
46
71
|
pause(): Promise<void>;
|
|
47
72
|
stop(): Promise<void>;
|
|
@@ -52,6 +77,7 @@ export declare class Engine {
|
|
|
52
77
|
getClipsIdsForPoint(x: number, y: number): null;
|
|
53
78
|
setSubtitles(subtitlesId: string, offset: number): void;
|
|
54
79
|
shouldSplitAudio(): boolean;
|
|
80
|
+
getFrameAsBase64Image(time?: number, mimeType?: "image/jpeg" | "image/webp" | "image/png", quality?: number): Promise<string>;
|
|
55
81
|
customClipTypes: Map<string, CustomClipConstructor>;
|
|
56
82
|
registerCustomClip<T extends CustomClip = CustomClip>(classType: CustomClipConstructor<T>, typeEnum: string): void;
|
|
57
83
|
callStaticCustomClipMethod(typeEnum: string, methodName: string, ...args: any[]): any;
|
|
@@ -82,6 +108,7 @@ export declare class Engine {
|
|
|
82
108
|
transitionSrc: string;
|
|
83
109
|
}[];
|
|
84
110
|
}[];
|
|
111
|
+
fitDuration: number;
|
|
85
112
|
};
|
|
86
113
|
library: {
|
|
87
114
|
subtitles: {
|
|
@@ -99,9 +126,43 @@ export declare class Engine {
|
|
|
99
126
|
id: string;
|
|
100
127
|
filename: string;
|
|
101
128
|
permanentUrl?: string | undefined;
|
|
129
|
+
hash?: string | undefined;
|
|
130
|
+
mimeType?: string | undefined;
|
|
131
|
+
customData?: [string, unknown][] | undefined;
|
|
102
132
|
}[];
|
|
103
133
|
};
|
|
134
|
+
subtitlesManager: {
|
|
135
|
+
textMode: "full" | "partial";
|
|
136
|
+
highlightAnimation: import("./modules/subtitleManager").HighlightAnimationEnum;
|
|
137
|
+
highlightAnimationSpeed: number;
|
|
138
|
+
mainTextStyle: {
|
|
139
|
+
fontSize?: number | undefined;
|
|
140
|
+
color?: string | undefined;
|
|
141
|
+
fontWeight?: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
142
|
+
fontFamily?: string | undefined;
|
|
143
|
+
fontStyle?: "normal" | "italic" | "oblique" | undefined;
|
|
144
|
+
wordWrapWidth?: number | null | undefined;
|
|
145
|
+
strokeThickness?: number | undefined;
|
|
146
|
+
strokeColor?: string | undefined;
|
|
147
|
+
};
|
|
148
|
+
highlightTextStyle: {
|
|
149
|
+
color?: string | undefined;
|
|
150
|
+
fontSize?: number | undefined;
|
|
151
|
+
fontWeight?: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
|
|
152
|
+
fontFamily?: string | undefined;
|
|
153
|
+
fontStyle?: "normal" | "italic" | "oblique" | undefined;
|
|
154
|
+
backgroundColor?: string | undefined;
|
|
155
|
+
backgroundPadding?: number | undefined;
|
|
156
|
+
strokeThickness?: number | undefined;
|
|
157
|
+
strokeColor?: string | undefined;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
104
160
|
version?: string | undefined;
|
|
161
|
+
projectId?: string | undefined;
|
|
162
|
+
settings?: {
|
|
163
|
+
preferredDecodingAcceleration: import("./modules/settings").PreferredAcceleration;
|
|
164
|
+
preferredEncodingAcceleration: import("./modules/settings").PreferredAcceleration;
|
|
165
|
+
} | undefined;
|
|
105
166
|
};
|
|
106
167
|
static deserialize(data: object): Promise<Engine | undefined>;
|
|
107
168
|
}
|