@rendley/sdk 1.11.14 → 1.11.15
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 +8 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +8 -0
- package/dist/modules/clip/clips/video/VideoClip.d.ts +8 -0
- package/dist/modules/layer/Layer.d.ts +1 -1
- package/dist/modules/library/MediaData.d.ts +6 -1
- package/dist/modules/settings/Settings.d.ts +32 -0
- package/package.json +1 -1
|
@@ -42,6 +42,14 @@ export declare class AudioClip extends Clip {
|
|
|
42
42
|
update(currentTime: number): void;
|
|
43
43
|
setMuted(muted: boolean): void;
|
|
44
44
|
isMuted(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves audio samples for a specified time range relative to the startTime from the associated media data.
|
|
47
|
+
*
|
|
48
|
+
* @param startTime - The start time in seconds relative to the startTime from which to extract audio samples.
|
|
49
|
+
* @param duration - The duration in seconds for which to extract audio samples.
|
|
50
|
+
* @returns An array of Float32Array representing the audio samples, or null if the media data is unavailable.
|
|
51
|
+
*/
|
|
52
|
+
getAudioSamples(startTime: number, duration?: number): Float32Array[] | null;
|
|
45
53
|
extractMonoAudioData(startTime: number, endTime: number): Promise<Float32Array | null>;
|
|
46
54
|
destroy(): void;
|
|
47
55
|
clone(): AudioClip;
|
|
@@ -66,6 +66,14 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
66
66
|
update(currentTime: number): void;
|
|
67
67
|
setMuted(muted: boolean): void;
|
|
68
68
|
isMuted(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves audio samples for a specified time range relative to the startTime from the associated media data.
|
|
71
|
+
*
|
|
72
|
+
* @param startTime - The start time in seconds relative to the startTime from which to extract audio samples.
|
|
73
|
+
* @param duration - The duration in seconds for which to extract audio samples.
|
|
74
|
+
* @returns An array of Float32Array representing the audio samples, or null if the media data is unavailable.
|
|
75
|
+
*/
|
|
76
|
+
getAudioSamples(startTime: number, duration?: number): Float32Array[] | null;
|
|
69
77
|
extractMonoAudioData(startTime: number, endTime: number): Promise<Float32Array | null>;
|
|
70
78
|
destroy(): void;
|
|
71
79
|
clone(): VideoClip;
|
|
@@ -99,7 +99,7 @@ export declare class Layer {
|
|
|
99
99
|
getVisibility(): boolean;
|
|
100
100
|
moveClipToLayer(clipId: string, newLayerId: string): void;
|
|
101
101
|
splitClip(clipId: string, time: number): Promise<Clip | null>;
|
|
102
|
-
addTransition(data: TransitionOptions | Transition):
|
|
102
|
+
addTransition(data: TransitionOptions | Transition): string;
|
|
103
103
|
removeTransition(id: string): void;
|
|
104
104
|
removeAllTransitionsByTransitionId(transitionId: string): void;
|
|
105
105
|
getTransitions(): Transition[];
|
|
@@ -34,7 +34,8 @@ export declare enum MediaDataStatus {
|
|
|
34
34
|
LOADING = "loading",
|
|
35
35
|
TRANSCODING = "transcoding",
|
|
36
36
|
FILMSTRIP = "filmstrip",
|
|
37
|
-
READY = "ready"
|
|
37
|
+
READY = "ready",
|
|
38
|
+
DESTROYED = "destroyed"
|
|
38
39
|
}
|
|
39
40
|
export declare class MediaData {
|
|
40
41
|
private id;
|
|
@@ -56,6 +57,7 @@ export declare class MediaData {
|
|
|
56
57
|
mimeType?: string;
|
|
57
58
|
customData?: Map<string, unknown>;
|
|
58
59
|
placeholderClipIds: string[];
|
|
60
|
+
sampleData: Float32Array[] | null;
|
|
59
61
|
audioSplit?: string;
|
|
60
62
|
private static lockMediaInfo;
|
|
61
63
|
private waitForMediaInfoUnlock;
|
|
@@ -70,6 +72,9 @@ export declare class MediaData {
|
|
|
70
72
|
getPlaceholderClips(): ReadonlyArray<string>;
|
|
71
73
|
removePlaceholderClip(clipId: string): void;
|
|
72
74
|
removeAllPlaceholderClips(): void;
|
|
75
|
+
private resampleLinear;
|
|
76
|
+
private extractAudioSamples;
|
|
77
|
+
getAudioSamples(startTime: number, duration?: number): Float32Array[] | null;
|
|
73
78
|
private checkPlaceholderClips;
|
|
74
79
|
setCustomData(key: string, value: unknown, overwrite?: boolean): boolean;
|
|
75
80
|
getCustomData(key: string): unknown;
|
|
@@ -25,6 +25,10 @@ export declare enum AutoLayoutMode {
|
|
|
25
25
|
}
|
|
26
26
|
export declare const SettingsSchema: z.ZodObject<{
|
|
27
27
|
m3u8MaxResolution: z.ZodDefault<z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
28
|
+
clipAudioStoreSamples: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
29
|
+
clipAudioSampleRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
30
|
+
clipAudioSampleForceMono: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
31
|
+
clipVideoStoreSamples: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28
32
|
renderShowPreview: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
29
33
|
renderMaxQueueSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
30
34
|
renderThrottleFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -48,6 +52,10 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
48
52
|
viewAutoLayoutOnResize: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof AutoLayoutMode>>>;
|
|
49
53
|
}, "strip", z.ZodTypeAny, {
|
|
50
54
|
m3u8MaxResolution: [number, number];
|
|
55
|
+
clipAudioStoreSamples: boolean;
|
|
56
|
+
clipAudioSampleRate: number;
|
|
57
|
+
clipAudioSampleForceMono: boolean;
|
|
58
|
+
clipVideoStoreSamples: boolean;
|
|
51
59
|
renderShowPreview: boolean;
|
|
52
60
|
renderMaxQueueSize: number;
|
|
53
61
|
renderThrottleFactor: number;
|
|
@@ -71,6 +79,10 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
71
79
|
viewAutoLayoutOnResize: AutoLayoutMode;
|
|
72
80
|
}, {
|
|
73
81
|
m3u8MaxResolution?: [number, number] | undefined;
|
|
82
|
+
clipAudioStoreSamples?: boolean | undefined;
|
|
83
|
+
clipAudioSampleRate?: number | undefined;
|
|
84
|
+
clipAudioSampleForceMono?: boolean | undefined;
|
|
85
|
+
clipVideoStoreSamples?: boolean | undefined;
|
|
74
86
|
renderShowPreview?: boolean | undefined;
|
|
75
87
|
renderMaxQueueSize?: number | undefined;
|
|
76
88
|
renderThrottleFactor?: number | undefined;
|
|
@@ -95,6 +107,10 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
95
107
|
}>;
|
|
96
108
|
export declare class Settings {
|
|
97
109
|
private m3u8MaxResolution;
|
|
110
|
+
private clipAudioStoreSamples;
|
|
111
|
+
private clipAudioSampleRate;
|
|
112
|
+
private clipAudioSampleForceMono;
|
|
113
|
+
private clipVideoStoreSamples;
|
|
98
114
|
private decoderUseWebCodecs;
|
|
99
115
|
private decoderPreferredAcceleration;
|
|
100
116
|
private encoderCodec;
|
|
@@ -120,6 +136,10 @@ export declare class Settings {
|
|
|
120
136
|
constructor();
|
|
121
137
|
getDefaultSettings(): {
|
|
122
138
|
m3u8MaxResolution: [number, number];
|
|
139
|
+
clipAudioStoreSamples: boolean;
|
|
140
|
+
clipAudioSampleRate: number;
|
|
141
|
+
clipAudioSampleForceMono: boolean;
|
|
142
|
+
clipVideoStoreSamples: boolean;
|
|
123
143
|
renderShowPreview: boolean;
|
|
124
144
|
renderMaxQueueSize: number;
|
|
125
145
|
renderThrottleFactor: number;
|
|
@@ -142,6 +162,14 @@ export declare class Settings {
|
|
|
142
162
|
subtitlesAutoWrapOnResize: boolean;
|
|
143
163
|
viewAutoLayoutOnResize: AutoLayoutMode;
|
|
144
164
|
};
|
|
165
|
+
setClipAudioStoreSamples(storeSamples: boolean): void;
|
|
166
|
+
getClipAudioStoreSamples(): boolean;
|
|
167
|
+
setClipAudioSampleRate(sampleRate: number): void;
|
|
168
|
+
getClipAudioSampleRate(): number;
|
|
169
|
+
setClipAudioSampleForceMono(forceMono: boolean): void;
|
|
170
|
+
getClipAudioSampleForceMono(): boolean;
|
|
171
|
+
setClipVideoStoreSamples(storeSamples: boolean): void;
|
|
172
|
+
getClipVideoStoreSamples(): boolean;
|
|
145
173
|
setEncoderCrf(crf: number): void;
|
|
146
174
|
getEncoderCrf(): number;
|
|
147
175
|
setEncoderDeadline(deadline: number): void;
|
|
@@ -200,6 +228,10 @@ export declare class Settings {
|
|
|
200
228
|
getViewAutoLayoutOnResize(): AutoLayoutMode;
|
|
201
229
|
serialize(): {
|
|
202
230
|
m3u8MaxResolution: [number, number];
|
|
231
|
+
clipAudioStoreSamples: boolean;
|
|
232
|
+
clipAudioSampleRate: number;
|
|
233
|
+
clipAudioSampleForceMono: boolean;
|
|
234
|
+
clipVideoStoreSamples: boolean;
|
|
203
235
|
renderShowPreview: boolean;
|
|
204
236
|
renderMaxQueueSize: number;
|
|
205
237
|
renderThrottleFactor: number;
|