@rendley/sdk 1.14.0 → 1.14.2
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 +55 -55
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/clip/clips/htmlText/HtmlTextClip.d.ts +4 -4
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +1 -1
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +4 -4
- package/dist/modules/clip/clips/text/TextClip.d.ts +1 -1
- package/dist/modules/clip/clips/text/TextStyle.d.ts +4 -4
- package/dist/modules/clip/clips/video/VideoClip.d.ts +2 -0
- package/dist/modules/library/Library.d.ts +33 -33
- package/dist/modules/library/MediaData.d.ts +9 -1
- package/dist/utils/browser/checkVideoCompatibilityOrTranscode.d.ts +1 -1
- package/dist/utils/transcode/transcodeMedia.d.ts +2 -2
- package/dist/utils/transcode/transcodeOutputPath.d.ts +1 -0
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ declare const HtmlTextStyleSchema: zod.ZodObject<{
|
|
|
28
28
|
}, "strip", zod.ZodTypeAny, {
|
|
29
29
|
color: string;
|
|
30
30
|
padding: number;
|
|
31
|
+
align: "left" | "center" | "right" | "justify";
|
|
31
32
|
fontSize: number;
|
|
32
33
|
fontWeight: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
33
34
|
fontFamily: string;
|
|
@@ -42,7 +43,6 @@ declare const HtmlTextStyleSchema: zod.ZodObject<{
|
|
|
42
43
|
dropShadowBlur: number;
|
|
43
44
|
dropShadowColor: string;
|
|
44
45
|
dropShadowDistance: number;
|
|
45
|
-
align: "left" | "center" | "right" | "justify";
|
|
46
46
|
breakWords: boolean;
|
|
47
47
|
fontVariant: "normal" | "small-caps";
|
|
48
48
|
stroke: string;
|
|
@@ -91,6 +91,7 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
91
91
|
getHtmlStyle(): {
|
|
92
92
|
color: string;
|
|
93
93
|
padding: number;
|
|
94
|
+
align: "left" | "center" | "right" | "justify";
|
|
94
95
|
fontSize: number;
|
|
95
96
|
fontWeight: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
96
97
|
fontFamily: string;
|
|
@@ -105,7 +106,6 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
105
106
|
dropShadowBlur: number;
|
|
106
107
|
dropShadowColor: string;
|
|
107
108
|
dropShadowDistance: number;
|
|
108
|
-
align: "left" | "center" | "right" | "justify";
|
|
109
109
|
breakWords: boolean;
|
|
110
110
|
fontVariant: "normal" | "small-caps";
|
|
111
111
|
stroke: string;
|
|
@@ -138,6 +138,7 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
138
138
|
htmlStyle: {
|
|
139
139
|
color: string;
|
|
140
140
|
padding: number;
|
|
141
|
+
align: "left" | "center" | "right" | "justify";
|
|
141
142
|
fontSize: number;
|
|
142
143
|
fontWeight: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
143
144
|
fontFamily: string;
|
|
@@ -152,7 +153,6 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
152
153
|
dropShadowBlur: number;
|
|
153
154
|
dropShadowColor: string;
|
|
154
155
|
dropShadowDistance: number;
|
|
155
|
-
align: "left" | "center" | "right" | "justify";
|
|
156
156
|
breakWords: boolean;
|
|
157
157
|
fontVariant: "normal" | "small-caps";
|
|
158
158
|
stroke: string;
|
|
@@ -163,8 +163,8 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
163
163
|
name?: string | undefined;
|
|
164
164
|
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
165
165
|
blendMode?: import('../../../../types').BlendModeEnum | undefined;
|
|
166
|
-
mediaDataId?: string | undefined;
|
|
167
166
|
style?: unknown;
|
|
167
|
+
mediaDataId?: string | undefined;
|
|
168
168
|
customData?: [string, unknown][] | undefined;
|
|
169
169
|
subtitlesId?: string | undefined;
|
|
170
170
|
animationController?: {
|
|
@@ -207,8 +207,8 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
207
207
|
name?: string | undefined;
|
|
208
208
|
wrapMode?: WrapModeEnum | undefined;
|
|
209
209
|
blendMode?: import('../../../../types').BlendModeEnum | undefined;
|
|
210
|
-
mediaDataId?: string | undefined;
|
|
211
210
|
style?: unknown;
|
|
211
|
+
mediaDataId?: string | undefined;
|
|
212
212
|
customData?: [string, unknown][] | undefined;
|
|
213
213
|
subtitlesId?: string | undefined;
|
|
214
214
|
animationController?: {
|
|
@@ -99,8 +99,8 @@ export declare const ShapeStyleSchema: z.ZodObject<{
|
|
|
99
99
|
width: z.ZodOptional<z.ZodNumber>;
|
|
100
100
|
alpha: z.ZodNumber;
|
|
101
101
|
rotation: z.ZodNumber;
|
|
102
|
-
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
103
102
|
height: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
104
104
|
clipId: z.ZodString;
|
|
105
105
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
106
106
|
crop: z.ZodDefault<z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
|
|
@@ -202,8 +202,8 @@ export declare const ShapeStyleSchema: z.ZodObject<{
|
|
|
202
202
|
relativeCornerRadius: boolean;
|
|
203
203
|
hasFill: boolean;
|
|
204
204
|
width?: number | undefined;
|
|
205
|
-
mediaDataId?: string | undefined;
|
|
206
205
|
height?: number | undefined;
|
|
206
|
+
mediaDataId?: string | undefined;
|
|
207
207
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
208
208
|
fillColor?: string | undefined;
|
|
209
209
|
strokeColor?: string | undefined;
|
|
@@ -240,8 +240,8 @@ export declare const ShapeStyleSchema: z.ZodObject<{
|
|
|
240
240
|
position: [number, number];
|
|
241
241
|
zIndex: number;
|
|
242
242
|
width?: number | undefined;
|
|
243
|
-
mediaDataId?: string | undefined;
|
|
244
243
|
height?: number | undefined;
|
|
244
|
+
mediaDataId?: string | undefined;
|
|
245
245
|
crop?: [number, number, number, number] | undefined;
|
|
246
246
|
cropOffset?: [number, number] | undefined;
|
|
247
247
|
zoom?: [number, number] | undefined;
|
|
@@ -333,8 +333,8 @@ export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
|
333
333
|
relativeCornerRadius: boolean;
|
|
334
334
|
hasFill: boolean;
|
|
335
335
|
width?: number | undefined;
|
|
336
|
-
mediaDataId?: string | undefined;
|
|
337
336
|
height?: number | undefined;
|
|
337
|
+
mediaDataId?: string | undefined;
|
|
338
338
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
339
339
|
fillColor?: string | undefined;
|
|
340
340
|
strokeColor?: string | undefined;
|
|
@@ -40,8 +40,8 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
40
40
|
name?: string | undefined;
|
|
41
41
|
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
42
42
|
blendMode?: import('../../../../index').BlendModeEnum | undefined;
|
|
43
|
-
mediaDataId?: string | undefined;
|
|
44
43
|
style?: unknown;
|
|
44
|
+
mediaDataId?: string | undefined;
|
|
45
45
|
customData?: [string, unknown][] | undefined;
|
|
46
46
|
subtitlesId?: string | undefined;
|
|
47
47
|
animationController?: {
|
|
@@ -28,8 +28,8 @@ export declare const TextStyleSchema: z.ZodObject<{
|
|
|
28
28
|
width: z.ZodOptional<z.ZodNumber>;
|
|
29
29
|
alpha: z.ZodNumber;
|
|
30
30
|
rotation: z.ZodNumber;
|
|
31
|
-
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
32
31
|
height: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
33
33
|
clipId: z.ZodString;
|
|
34
34
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
35
35
|
crop: z.ZodDefault<z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
|
|
@@ -88,8 +88,8 @@ export declare const TextStyleSchema: z.ZodObject<{
|
|
|
88
88
|
dropShadowColor: string;
|
|
89
89
|
dropShadowDistance: number;
|
|
90
90
|
width?: number | undefined;
|
|
91
|
-
mediaDataId?: string | undefined;
|
|
92
91
|
height?: number | undefined;
|
|
92
|
+
mediaDataId?: string | undefined;
|
|
93
93
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
94
94
|
}, {
|
|
95
95
|
scale: [number, number];
|
|
@@ -106,8 +106,8 @@ export declare const TextStyleSchema: z.ZodObject<{
|
|
|
106
106
|
fontStyle: "normal" | "italic" | "oblique";
|
|
107
107
|
backgroundColor: string | null;
|
|
108
108
|
width?: number | undefined;
|
|
109
|
-
mediaDataId?: string | undefined;
|
|
110
109
|
height?: number | undefined;
|
|
110
|
+
mediaDataId?: string | undefined;
|
|
111
111
|
crop?: [number, number, number, number] | undefined;
|
|
112
112
|
cropOffset?: [number, number] | undefined;
|
|
113
113
|
zoom?: [number, number] | undefined;
|
|
@@ -222,8 +222,8 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
222
222
|
dropShadowColor: string;
|
|
223
223
|
dropShadowDistance: number;
|
|
224
224
|
width?: number | undefined;
|
|
225
|
-
mediaDataId?: string | undefined;
|
|
226
225
|
height?: number | undefined;
|
|
226
|
+
mediaDataId?: string | undefined;
|
|
227
227
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
228
228
|
};
|
|
229
229
|
static deserialize(payload: object): TextStyle;
|
|
@@ -31,6 +31,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
31
31
|
private freezeTime?;
|
|
32
32
|
private actions;
|
|
33
33
|
private isProcessing;
|
|
34
|
+
private lastProcessingAction;
|
|
34
35
|
private lastUpdateTime;
|
|
35
36
|
private lastStartTime;
|
|
36
37
|
private lastLeftTrim;
|
|
@@ -63,6 +64,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
63
64
|
updateMediaData(newMediaId?: string, options?: ReplaceMediaOptions): Promise<boolean>;
|
|
64
65
|
preload(currentTime: number): void;
|
|
65
66
|
private addActionToQueue;
|
|
67
|
+
private setProcessingAction;
|
|
66
68
|
private processNextQueue;
|
|
67
69
|
private seekedCallback;
|
|
68
70
|
private playingCallback;
|
|
@@ -343,6 +343,17 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
343
343
|
wordTimings?: number[] | undefined;
|
|
344
344
|
}[];
|
|
345
345
|
}[];
|
|
346
|
+
media: {
|
|
347
|
+
type: string;
|
|
348
|
+
id: string;
|
|
349
|
+
filename: string;
|
|
350
|
+
name?: string | undefined;
|
|
351
|
+
permanentUrl?: string | undefined;
|
|
352
|
+
hash?: string | undefined;
|
|
353
|
+
mimeType?: string | undefined;
|
|
354
|
+
customData?: [string, unknown][] | undefined;
|
|
355
|
+
placeholderClipIds?: string[] | undefined;
|
|
356
|
+
}[];
|
|
346
357
|
transitions: {
|
|
347
358
|
name: string;
|
|
348
359
|
properties: {
|
|
@@ -401,17 +412,6 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
401
412
|
blendMode?: import('../../index').BlendModeEnum | undefined;
|
|
402
413
|
padding?: number | undefined;
|
|
403
414
|
}[];
|
|
404
|
-
media: {
|
|
405
|
-
type: string;
|
|
406
|
-
id: string;
|
|
407
|
-
filename: string;
|
|
408
|
-
name?: string | undefined;
|
|
409
|
-
permanentUrl?: string | undefined;
|
|
410
|
-
hash?: string | undefined;
|
|
411
|
-
mimeType?: string | undefined;
|
|
412
|
-
customData?: [string, unknown][] | undefined;
|
|
413
|
-
placeholderClipIds?: string[] | undefined;
|
|
414
|
-
}[];
|
|
415
415
|
customData?: [string, unknown][] | undefined;
|
|
416
416
|
}, {
|
|
417
417
|
subtitles: {
|
|
@@ -425,6 +425,17 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
425
425
|
wordTimings?: number[] | undefined;
|
|
426
426
|
}[];
|
|
427
427
|
}[];
|
|
428
|
+
media: {
|
|
429
|
+
type: string;
|
|
430
|
+
id: string;
|
|
431
|
+
filename: string;
|
|
432
|
+
name?: string | undefined;
|
|
433
|
+
permanentUrl?: string | undefined;
|
|
434
|
+
hash?: string | undefined;
|
|
435
|
+
mimeType?: string | undefined;
|
|
436
|
+
customData?: [string, unknown][] | undefined;
|
|
437
|
+
placeholderClipIds?: string[] | undefined;
|
|
438
|
+
}[];
|
|
428
439
|
transitions: {
|
|
429
440
|
name: string;
|
|
430
441
|
properties: {
|
|
@@ -483,17 +494,6 @@ export declare const LibrarySchema: z.ZodObject<{
|
|
|
483
494
|
blendMode?: import('../../index').BlendModeEnum | undefined;
|
|
484
495
|
padding?: number | undefined;
|
|
485
496
|
}[];
|
|
486
|
-
media: {
|
|
487
|
-
type: string;
|
|
488
|
-
id: string;
|
|
489
|
-
filename: string;
|
|
490
|
-
name?: string | undefined;
|
|
491
|
-
permanentUrl?: string | undefined;
|
|
492
|
-
hash?: string | undefined;
|
|
493
|
-
mimeType?: string | undefined;
|
|
494
|
-
customData?: [string, unknown][] | undefined;
|
|
495
|
-
placeholderClipIds?: string[] | undefined;
|
|
496
|
-
}[];
|
|
497
497
|
customData?: [string, unknown][] | undefined;
|
|
498
498
|
}>;
|
|
499
499
|
export declare class Library {
|
|
@@ -582,6 +582,17 @@ export declare class Library {
|
|
|
582
582
|
wordTimings?: number[] | undefined;
|
|
583
583
|
}[];
|
|
584
584
|
}[];
|
|
585
|
+
media: {
|
|
586
|
+
type: string;
|
|
587
|
+
id: string;
|
|
588
|
+
filename: string;
|
|
589
|
+
name?: string | undefined;
|
|
590
|
+
permanentUrl?: string | undefined;
|
|
591
|
+
hash?: string | undefined;
|
|
592
|
+
mimeType?: string | undefined;
|
|
593
|
+
customData?: [string, unknown][] | undefined;
|
|
594
|
+
placeholderClipIds?: string[] | undefined;
|
|
595
|
+
}[];
|
|
585
596
|
transitions: {
|
|
586
597
|
name: string;
|
|
587
598
|
properties: {
|
|
@@ -640,17 +651,6 @@ export declare class Library {
|
|
|
640
651
|
blendMode?: import('../../index').BlendModeEnum | undefined;
|
|
641
652
|
padding?: number | undefined;
|
|
642
653
|
}[];
|
|
643
|
-
media: {
|
|
644
|
-
type: string;
|
|
645
|
-
id: string;
|
|
646
|
-
filename: string;
|
|
647
|
-
name?: string | undefined;
|
|
648
|
-
permanentUrl?: string | undefined;
|
|
649
|
-
hash?: string | undefined;
|
|
650
|
-
mimeType?: string | undefined;
|
|
651
|
-
customData?: [string, unknown][] | undefined;
|
|
652
|
-
placeholderClipIds?: string[] | undefined;
|
|
653
|
-
}[];
|
|
654
654
|
customData?: [string, unknown][] | undefined;
|
|
655
655
|
};
|
|
656
656
|
static deserialize(data: object): Library;
|
|
@@ -82,6 +82,13 @@ export declare class MediaData {
|
|
|
82
82
|
private workerFSFilePath?;
|
|
83
83
|
private fetchAbortController;
|
|
84
84
|
audioSplit?: string;
|
|
85
|
+
private static audioSampleWorker;
|
|
86
|
+
private static audioSampleWorkerInitPromise;
|
|
87
|
+
private static audioSampleActiveRequests;
|
|
88
|
+
private static audioSampleCleanupTimer;
|
|
89
|
+
private static readonly AUDIO_SAMPLE_WORKER_IDLE_TIMEOUT_MS;
|
|
90
|
+
private static acquireAudioSampleWorker;
|
|
91
|
+
private static releaseAudioSampleWorker;
|
|
85
92
|
private static lockMediaInfo;
|
|
86
93
|
private waitForMediaInfoUnlock;
|
|
87
94
|
static unlockMediaInfo(): void;
|
|
@@ -110,7 +117,6 @@ export declare class MediaData {
|
|
|
110
117
|
getFilmstripState(): MediaProcessStatusEnum;
|
|
111
118
|
getFilmstripData(): IFilmstripData[];
|
|
112
119
|
getFilmstripDataRange(start: number, end: number): IFilmstripData[];
|
|
113
|
-
private resampleLinear;
|
|
114
120
|
private hasSvgXmlSignature;
|
|
115
121
|
private normalizeSvgMetadata;
|
|
116
122
|
private isWorkerFSMountedPath;
|
|
@@ -118,6 +124,8 @@ export declare class MediaData {
|
|
|
118
124
|
private ensureWorkerFSRoot;
|
|
119
125
|
private cleanupWorkerFSMount;
|
|
120
126
|
private mountInputToWorkerFS;
|
|
127
|
+
private deinterleaveAudioSamples;
|
|
128
|
+
private mixToMono;
|
|
121
129
|
private extractAudioSamples;
|
|
122
130
|
getAudioSamples(startTime: number, duration?: number): Float32Array[] | null;
|
|
123
131
|
private checkPlaceholderClips;
|
|
@@ -14,5 +14,5 @@ interface CheckVideoCompatibilityOrTranscodeOptions {
|
|
|
14
14
|
unlockMediaInfo: () => void;
|
|
15
15
|
timeoutMs?: number;
|
|
16
16
|
}
|
|
17
|
-
export declare function checkVideoCompatibilityOrTranscode({ blobUrl, filePath,
|
|
17
|
+
export declare function checkVideoCompatibilityOrTranscode({ blobUrl, filePath, mediaDataId, getData, info, fileName, outputPath, permanentUrl, mimeType, waitForMediaInfoUnlock, lockMediaInfo, unlockMediaInfo, timeoutMs, }: CheckVideoCompatibilityOrTranscodeOptions): Promise<boolean>;
|
|
18
18
|
export {};
|
|
@@ -7,7 +7,7 @@ interface InternalFFmpegTranscodeOptions {
|
|
|
7
7
|
lockMediaInfo: () => void;
|
|
8
8
|
unlockMediaInfo: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare function internalFFmpegTranscode({ filePath,
|
|
10
|
+
export declare function internalFFmpegTranscode({ filePath, mediaDataId, outputPath, waitForMediaInfoUnlock, lockMediaInfo, unlockMediaInfo, }: InternalFFmpegTranscodeOptions): Promise<boolean>;
|
|
11
11
|
interface TranscodeMediaOptions {
|
|
12
12
|
filePath: string;
|
|
13
13
|
outputPath?: string;
|
|
@@ -21,5 +21,5 @@ interface TranscodeMediaOptions {
|
|
|
21
21
|
lockMediaInfo: () => void;
|
|
22
22
|
unlockMediaInfo: () => void;
|
|
23
23
|
}
|
|
24
|
-
export declare function transcodeMedia({ filePath,
|
|
24
|
+
export declare function transcodeMedia({ filePath, mediaDataId, getData, info, fileName, outputPath, permanentUrl, mimeType, waitForMediaInfoUnlock, lockMediaInfo, unlockMediaInfo, }: TranscodeMediaOptions): Promise<boolean>;
|
|
25
25
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDefaultTranscodeOutputPath(filePath: string, mediaDataId: string): string;
|