@rendley/sdk 1.0.1 → 1.0.3
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 +16 -19
- package/dist/config/config.d.ts +2 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.js +1 -1
- package/dist/libs/ffmpeg/classes.d.ts +9 -5
- package/dist/libs/ffmpeg/config.d.ts +1 -1
- package/dist/libs/ffmpeg/const.d.ts +8 -6
- package/dist/libs/ffmpeg/types.d.ts +4 -1
- package/dist/libs/ffmpeg/worker.d.ts +1 -1
- package/dist/modules/clip/Clip.d.ts +8 -17
- package/dist/modules/clip/ClipStyle.d.ts +2 -8
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +2 -2
- package/dist/modules/clip/clips/gif/GifClip.d.ts +3 -3
- package/dist/modules/clip/clips/image/ImageClip.d.ts +3 -3
- package/dist/modules/clip/clips/index.d.ts +7 -4
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +3 -5
- package/dist/modules/clip/clips/shape/ShapeSprite.d.ts +1 -1
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +2 -3
- package/dist/modules/clip/clips/text/TextClip.d.ts +3 -5
- package/dist/modules/clip/clips/text/TextSprite.d.ts +1 -1
- package/dist/modules/clip/clips/text/TextStyle.d.ts +3 -4
- package/dist/modules/clip/clips/video/VideoClip.d.ts +3 -3
- package/dist/modules/clip/index.d.ts +3 -2
- package/dist/modules/display/Display.d.ts +8 -8
- package/dist/modules/display/index.d.ts +1 -1
- package/dist/modules/display/renderer/PixiRenderer.d.ts +1 -1
- package/dist/modules/display/utils/WebCodecsVideoFrameResource.d.ts +1 -1
- package/dist/modules/display/utils/registerSelectionEvents.d.ts +1 -1
- package/dist/modules/event-emitter/EventEmitter.d.ts +2 -2
- package/dist/modules/event-emitter/index.d.ts +2 -2
- package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +8 -8
- package/dist/modules/filter/Effect.d.ts +1 -2
- package/dist/modules/filter/Filter.d.ts +2 -6
- package/dist/modules/filter/index.d.ts +2 -2
- package/dist/modules/font-registry/index.d.ts +1 -1
- package/dist/modules/layer/Layer.d.ts +7 -21
- package/dist/modules/layer/index.d.ts +1 -1
- package/dist/modules/library/Library.d.ts +3 -3
- package/dist/modules/library/MediaData.d.ts +14 -3
- package/dist/modules/library/Subtitles.d.ts +1 -1
- package/dist/modules/library/index.d.ts +3 -1
- package/dist/modules/subtitleManager/SubtitleManager.d.ts +1 -1
- package/dist/modules/subtitleManager/index.d.ts +1 -1
- package/dist/modules/timeline/Timeline.d.ts +4 -27
- package/dist/modules/timeline/index.d.ts +1 -1
- package/dist/modules/transition/Transition.d.ts +3 -3
- package/dist/modules/transition/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/dom/recreateDomCanvas.d.ts +1 -0
- package/dist/utils/texture/createGradientTexture.d.ts +1 -1
- package/package.json +6 -8
- package/dist/modules/filter/effects/OldFilmEffect.d.ts +0 -2
- package/dist/modules/filter/effects/WaveEffect.d.ts +0 -2
- package/dist/modules/filter/filters/VintageFilter.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DemuxerPacket, FFFSMountOptions, FFFSPath, FFFSType, FFMessageFrameData, FFMessageLoadConfig, FFMessageRenderSettings, FileData, FSNode, IsFirst, LogEventCallback, OK, ProgressEventCallback, FFMessageMuxerData, FFMessageInitMuxerData, FFMessageAuthentificateData } from
|
|
1
|
+
import { DemuxerPacket, FFFSMountOptions, FFFSPath, FFFSType, FFMessageFrameData, FFMessageLoadConfig, FFMessageRenderSettings, FileData, FSNode, IsFirst, LogEventCallback, OK, ProgressEventCallback, FFMessageMuxerData, FFMessageInitMuxerData, FFMessageAuthentificateData, FFMessageFetchTSChunksData } from "./types";
|
|
2
2
|
import { MediaInfo } from '../../modules/ffmpeg/types/FFmpeg.types';
|
|
3
3
|
type FFMessageOptions = {
|
|
4
4
|
signal?: AbortSignal;
|
|
@@ -38,15 +38,15 @@ export declare class FFmpeg {
|
|
|
38
38
|
*
|
|
39
39
|
* @category FFmpeg
|
|
40
40
|
*/
|
|
41
|
-
on(event:
|
|
42
|
-
on(event:
|
|
41
|
+
on(event: "log", callback: LogEventCallback): void;
|
|
42
|
+
on(event: "progress", callback: ProgressEventCallback): void;
|
|
43
43
|
/**
|
|
44
44
|
* Unlisten to log or prgress events from `ffmpeg.exec()`.
|
|
45
45
|
*
|
|
46
46
|
* @category FFmpeg
|
|
47
47
|
*/
|
|
48
|
-
off(event:
|
|
49
|
-
off(event:
|
|
48
|
+
off(event: "log", callback: LogEventCallback): void;
|
|
49
|
+
off(event: "progress", callback: ProgressEventCallback): void;
|
|
50
50
|
/**
|
|
51
51
|
* Loads ffmpeg-core inside web worker. It is required to call this method first
|
|
52
52
|
* as it initializes WebAssembly and other essential variables.
|
|
@@ -157,6 +157,8 @@ export declare class FFmpeg {
|
|
|
157
157
|
isAuthenticated: () => Promise<boolean>;
|
|
158
158
|
getAuthStatus: () => Promise<number>;
|
|
159
159
|
getAuthSecondsRemaining: () => Promise<number>;
|
|
160
|
+
getAuthLicenseType: () => Promise<string>;
|
|
161
|
+
fetchFSChunks: (data: FFMessageFetchTSChunksData, { signal }?: FFMessageOptions) => Promise<Uint8Array>;
|
|
160
162
|
getSettings: () => Promise<OK>;
|
|
161
163
|
/**
|
|
162
164
|
* Gets information about a media file.
|
|
@@ -197,5 +199,7 @@ export declare class FFmpeg {
|
|
|
197
199
|
*/
|
|
198
200
|
getMediaInfo: (path: string, { signal }?: FFMessageOptions) => Promise<MediaInfo>;
|
|
199
201
|
getMediaSubtitles: (path: string, { signal }?: FFMessageOptions) => Promise<string>;
|
|
202
|
+
private tmpADownloadTag;
|
|
203
|
+
downloadFile: (path: string, downloadFileName: string | undefined) => Promise<OK>;
|
|
200
204
|
}
|
|
201
205
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FFMessageLoadConfig } from
|
|
1
|
+
import { FFMessageLoadConfig } from "./types";
|
|
2
2
|
export declare const FFMPEG_CORE_CONFIG: FFMessageLoadConfig;
|
|
@@ -20,18 +20,20 @@ export declare enum FFMessageType {
|
|
|
20
20
|
RENDER_PREPARE = "RENDER_PREPARE",
|
|
21
21
|
RENDER_CANCEL = "RENDER_CANCEL",
|
|
22
22
|
RENDER_FINALIZE = "RENDER_FINALIZE",
|
|
23
|
-
|
|
23
|
+
RENDER_ADD_FRAME = "RENDER_ADD_FRAME",
|
|
24
24
|
GET_INFO = "GET_INFO",
|
|
25
25
|
GET_SUBTITLES = "GET_SUBTITLES",
|
|
26
26
|
DEMUXER_INIT = "DEMUXER_INIT",
|
|
27
27
|
DEMUXER_SEEK = "DEMUXER_SEEK",
|
|
28
28
|
DEMUXER_CLOSE = "DEMUXER_CLOSE",
|
|
29
|
-
|
|
29
|
+
DEMUXER_GET_PACKET = "DEMUXER_GET_PACKET",
|
|
30
30
|
MUXER_INIT = "MUXER_INIT",
|
|
31
|
-
|
|
31
|
+
MUXER_ADD_VIDEO_CHUNK = "MUXER_ADD_VIDEO_CHUNK",
|
|
32
32
|
MUXER_CLOSE = "MUXER_FINALIZE",
|
|
33
33
|
AUTH_AUTHENTICATE = "AUTHENTICATE",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
AUTH_GET_STATUS = "AUTH_STATUS",
|
|
35
|
+
AUTH_GET_SECONDS = "AUTH_GET_SECONDS",
|
|
36
|
+
AUTH_IS_AUTHENTICATED = "AUTH_IS_AUTHENTICATED",
|
|
37
|
+
AUTH_GET_LICENSE_TYPE = "AUTH_GET_LICENSE_TYPE",
|
|
38
|
+
FETCH_TS_CHUNKS = "FETCH_TS_CHUNKS"
|
|
37
39
|
}
|
|
@@ -93,6 +93,9 @@ export interface FFMessageAuthentificateData {
|
|
|
93
93
|
licensee: string;
|
|
94
94
|
key: string;
|
|
95
95
|
}
|
|
96
|
+
export interface FFMessageFetchTSChunksData {
|
|
97
|
+
urls: string[];
|
|
98
|
+
}
|
|
96
99
|
/**
|
|
97
100
|
* @remarks
|
|
98
101
|
* Only deletes empty directory.
|
|
@@ -126,7 +129,7 @@ export interface FFMessageMountData {
|
|
|
126
129
|
export interface FFMessageUnmountData {
|
|
127
130
|
mountPoint: FFFSPath;
|
|
128
131
|
}
|
|
129
|
-
export type FFMessageData = FFMessageLoadConfig | FFMessageExecData | FFMessageWriteFileData | FFMessageReadFileData | FFMessageDeleteFileData | FFMessageRenameData | FFMessageCreateDirData | FFMessageListDirData | FFMessageDeleteDirData | FFMessageMountData | FFMessageUnmountData | FFMessageGetInfoData | FFMessageGetSubtitlesData | FFMessageFrameData | FFMessageRenderSettings | FFMessageInitDemuxerData | FFMessageSeekDemuxerData | FFMessageIdDemuxerData | FFMessageMuxerData | FFMessageAuthentificateData;
|
|
132
|
+
export type FFMessageData = FFMessageLoadConfig | FFMessageExecData | FFMessageWriteFileData | FFMessageReadFileData | FFMessageDeleteFileData | FFMessageRenameData | FFMessageCreateDirData | FFMessageListDirData | FFMessageDeleteDirData | FFMessageMountData | FFMessageUnmountData | FFMessageGetInfoData | FFMessageGetSubtitlesData | FFMessageFrameData | FFMessageRenderSettings | FFMessageInitDemuxerData | FFMessageSeekDemuxerData | FFMessageIdDemuxerData | FFMessageMuxerData | FFMessageAuthentificateData | FFMessageFetchTSChunksData;
|
|
130
133
|
export interface Message {
|
|
131
134
|
type: string;
|
|
132
135
|
data?: FFMessageData;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference lib="esnext" />
|
|
3
3
|
/// <reference lib="webworker" />
|
|
4
4
|
/// <reference lib="dom" />
|
|
5
|
-
import type { FFmpegCoreModuleFactory } from
|
|
5
|
+
import type { FFmpegCoreModuleFactory } from "./types";
|
|
6
6
|
declare global {
|
|
7
7
|
interface WorkerGlobalScope {
|
|
8
8
|
createFFmpegCore: FFmpegCoreModuleFactory;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { ClipStyle } from
|
|
4
|
-
import { Effect, Filter } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { ClipStyle } from "./ClipStyle";
|
|
4
|
+
import { Effect, Filter } from "../filter";
|
|
5
5
|
import { WarmModeEnum } from '../../types/clip.types';
|
|
6
6
|
export declare enum ClipState {
|
|
7
7
|
Idle = 0,
|
|
@@ -10,6 +10,7 @@ export declare enum ClipState {
|
|
|
10
10
|
Offloaded = 3
|
|
11
11
|
}
|
|
12
12
|
export interface ClipOptions<K extends ClipStyle = ClipStyle> {
|
|
13
|
+
id?: string;
|
|
13
14
|
mediaDataId?: string;
|
|
14
15
|
subtitlesId?: string;
|
|
15
16
|
subtitlesOffset?: number;
|
|
@@ -17,12 +18,11 @@ export interface ClipOptions<K extends ClipStyle = ClipStyle> {
|
|
|
17
18
|
duration?: number;
|
|
18
19
|
leftTrim?: number;
|
|
19
20
|
rightTrim?: number;
|
|
20
|
-
filters?: Clip[
|
|
21
|
-
effects?: Clip[
|
|
22
|
-
style?: Partial<ReturnType<K[
|
|
21
|
+
filters?: Clip["filters"];
|
|
22
|
+
effects?: Clip["effects"];
|
|
23
|
+
style?: Partial<ReturnType<K["serialize"]>>;
|
|
23
24
|
}
|
|
24
25
|
export declare const ClipSchema: z.ZodObject<{
|
|
25
|
-
name: z.ZodString;
|
|
26
26
|
id: z.ZodString;
|
|
27
27
|
type: z.ZodString;
|
|
28
28
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
@@ -34,7 +34,6 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
34
34
|
rightTrim: z.ZodNumber;
|
|
35
35
|
filters: z.ZodArray<z.ZodObject<{
|
|
36
36
|
id: z.ZodString;
|
|
37
|
-
name: z.ZodString;
|
|
38
37
|
sourceId: z.ZodString;
|
|
39
38
|
options: z.ZodObject<{
|
|
40
39
|
lutUrl: z.ZodString;
|
|
@@ -44,14 +43,12 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
44
43
|
lutUrl: string;
|
|
45
44
|
}>;
|
|
46
45
|
}, "strip", z.ZodTypeAny, {
|
|
47
|
-
name: string;
|
|
48
46
|
options: {
|
|
49
47
|
lutUrl: string;
|
|
50
48
|
};
|
|
51
49
|
id: string;
|
|
52
50
|
sourceId: string;
|
|
53
51
|
}, {
|
|
54
|
-
name: string;
|
|
55
52
|
options: {
|
|
56
53
|
lutUrl: string;
|
|
57
54
|
};
|
|
@@ -63,12 +60,10 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
63
60
|
style: z.ZodUnknown;
|
|
64
61
|
text: z.ZodOptional<z.ZodString>;
|
|
65
62
|
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
name: string;
|
|
67
63
|
type: string;
|
|
68
64
|
id: string;
|
|
69
65
|
duration: number;
|
|
70
66
|
filters: {
|
|
71
|
-
name: string;
|
|
72
67
|
options: {
|
|
73
68
|
lutUrl: string;
|
|
74
69
|
};
|
|
@@ -86,12 +81,10 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
86
81
|
style?: unknown;
|
|
87
82
|
text?: string | undefined;
|
|
88
83
|
}, {
|
|
89
|
-
name: string;
|
|
90
84
|
type: string;
|
|
91
85
|
id: string;
|
|
92
86
|
duration: number;
|
|
93
87
|
filters: {
|
|
94
|
-
name: string;
|
|
95
88
|
options: {
|
|
96
89
|
lutUrl: string;
|
|
97
90
|
};
|
|
@@ -179,12 +172,10 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
179
172
|
clone(): Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>;
|
|
180
173
|
protected updateTexture(pixels: Uint8Array, width: number, height: number): void;
|
|
181
174
|
serialize(): {
|
|
182
|
-
name: string;
|
|
183
175
|
type: string;
|
|
184
176
|
id: string;
|
|
185
177
|
duration: number;
|
|
186
178
|
filters: {
|
|
187
|
-
name: string;
|
|
188
179
|
options: {
|
|
189
180
|
lutUrl: string;
|
|
190
181
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { z } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
export interface ClipStyleOptions {
|
|
4
4
|
clipId: string;
|
|
5
5
|
mediaDataId?: string;
|
|
@@ -12,7 +12,6 @@ export interface ClipStyleOptions {
|
|
|
12
12
|
height?: number;
|
|
13
13
|
}
|
|
14
14
|
export declare const schema: z.ZodObject<{
|
|
15
|
-
name: z.ZodString;
|
|
16
15
|
clipId: z.ZodString;
|
|
17
16
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
18
17
|
alpha: z.ZodNumber;
|
|
@@ -23,7 +22,6 @@ export declare const schema: z.ZodObject<{
|
|
|
23
22
|
width: z.ZodOptional<z.ZodNumber>;
|
|
24
23
|
height: z.ZodOptional<z.ZodNumber>;
|
|
25
24
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
name: string;
|
|
27
25
|
clipId: string;
|
|
28
26
|
alpha: number;
|
|
29
27
|
rotation: number;
|
|
@@ -34,7 +32,6 @@ export declare const schema: z.ZodObject<{
|
|
|
34
32
|
width?: number | undefined;
|
|
35
33
|
height?: number | undefined;
|
|
36
34
|
}, {
|
|
37
|
-
name: string;
|
|
38
35
|
clipId: string;
|
|
39
36
|
alpha: number;
|
|
40
37
|
rotation: number;
|
|
@@ -61,8 +58,6 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
61
58
|
private scaleDownToFit;
|
|
62
59
|
setScale(scaleX: number, scaleY: number): void;
|
|
63
60
|
getScale(): [number, number];
|
|
64
|
-
setWidth(width: number): void;
|
|
65
|
-
setHeight(height: number): void;
|
|
66
61
|
getWidth(): number;
|
|
67
62
|
getHeight(): number;
|
|
68
63
|
setAlpha(alpha: number): void;
|
|
@@ -77,7 +72,6 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
77
72
|
update(sprite: T): void;
|
|
78
73
|
protected emitUpdateEvent(property: string, value: unknown): boolean;
|
|
79
74
|
serialize(): {
|
|
80
|
-
name: string;
|
|
81
75
|
clipId: string;
|
|
82
76
|
alpha: number;
|
|
83
77
|
rotation: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Clip, ClipOptions } from
|
|
1
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
2
2
|
export interface AudioClipOptions extends ClipOptions {
|
|
3
3
|
mediaDataId: string;
|
|
4
4
|
}
|
|
@@ -32,5 +32,5 @@ export declare class AudioClip extends Clip {
|
|
|
32
32
|
destroy(): void;
|
|
33
33
|
update(currentTime: number): void;
|
|
34
34
|
offload(): void;
|
|
35
|
-
clone(): Clip<import("pixi.js").Sprite, import("
|
|
35
|
+
clone(): Clip<import("pixi.js").Sprite, import("../..").ClipStyle<import("pixi.js").Sprite>>;
|
|
36
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { Clip, ClipOptions } from
|
|
3
|
-
import { ClipStyle } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
3
|
+
import { ClipStyle } from "../../ClipStyle";
|
|
4
4
|
export interface GifClipOptions extends ClipOptions<ClipStyle> {
|
|
5
5
|
mediaDataId: string;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { Clip, ClipOptions } from
|
|
3
|
-
import { ClipStyle } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
3
|
+
import { ClipStyle } from "../../ClipStyle";
|
|
4
4
|
export interface ImageClipOptions extends ClipOptions<ClipStyle> {
|
|
5
5
|
mediaDataId: string;
|
|
6
6
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./audio/AudioClip";
|
|
2
|
+
export * from "./image/ImageClip";
|
|
3
|
+
export * from "./video/VideoClip";
|
|
4
|
+
export * from "./shape/ShapeClip";
|
|
5
|
+
export * from "./gif/GifClip";
|
|
6
|
+
export * from "./text/TextClip";
|
|
7
|
+
export * from "./text/TextStyle";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ShapeSprite } from
|
|
2
|
-
import { ShapeStyle } from
|
|
3
|
-
import { Clip, ClipOptions } from
|
|
1
|
+
import { ShapeSprite } from "./ShapeSprite";
|
|
2
|
+
import { ShapeStyle } from "./ShapeStyle";
|
|
3
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
4
4
|
export interface ShapeClipOptions extends ClipOptions<ShapeStyle> {
|
|
5
5
|
shape: string;
|
|
6
6
|
}
|
|
@@ -15,13 +15,11 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
15
15
|
clone(): ShapeClip;
|
|
16
16
|
destroy(): void;
|
|
17
17
|
serialize(): {
|
|
18
|
-
name: string;
|
|
19
18
|
type: string;
|
|
20
19
|
id: string;
|
|
21
20
|
shape: string;
|
|
22
21
|
duration: number;
|
|
23
22
|
filters: {
|
|
24
|
-
name: string;
|
|
25
23
|
options: {
|
|
26
24
|
lutUrl: string;
|
|
27
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ShapeSprite } from
|
|
2
|
-
import { ClipStyle, ClipStyleOptions } from
|
|
1
|
+
import { ShapeSprite } from "./ShapeSprite";
|
|
2
|
+
import { ClipStyle, ClipStyleOptions } from "../../ClipStyle";
|
|
3
3
|
interface ShapeClipStyleOptions extends ClipStyleOptions {
|
|
4
4
|
color?: string;
|
|
5
5
|
}
|
|
@@ -10,7 +10,6 @@ export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
|
10
10
|
getColor(): string;
|
|
11
11
|
update(container: ShapeSprite): void;
|
|
12
12
|
serialize(): {
|
|
13
|
-
name: string;
|
|
14
13
|
color: string;
|
|
15
14
|
clipId: string;
|
|
16
15
|
alpha: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextSprite } from
|
|
2
|
-
import { TextStyle } from
|
|
3
|
-
import { Clip, ClipOptions } from
|
|
1
|
+
import { TextSprite } from "./TextSprite";
|
|
2
|
+
import { TextStyle } from "./TextStyle";
|
|
3
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
4
4
|
export interface TextClipOptions extends ClipOptions<TextStyle> {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
@@ -15,13 +15,11 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
15
15
|
offload(): void;
|
|
16
16
|
clone(): TextClip;
|
|
17
17
|
serialize(): {
|
|
18
|
-
name: string;
|
|
19
18
|
text: string;
|
|
20
19
|
type: string;
|
|
21
20
|
id: string;
|
|
22
21
|
duration: number;
|
|
23
22
|
filters: {
|
|
24
|
-
name: string;
|
|
25
23
|
options: {
|
|
26
24
|
lutUrl: string;
|
|
27
25
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { TextSprite } from
|
|
3
|
-
import { ClipStyle, ClipStyleOptions } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TextSprite } from "./TextSprite";
|
|
3
|
+
import { ClipStyle, ClipStyleOptions } from "../../ClipStyle";
|
|
4
4
|
declare const FontWeightSchema: z.ZodEnum<["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]>;
|
|
5
5
|
declare const TextAlignSchema: z.ZodEnum<["left", "center", "right", "justify"]>;
|
|
6
6
|
declare const FontStyleSchema: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
@@ -46,7 +46,6 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
46
46
|
setRotation(rotation: number): void;
|
|
47
47
|
update(container: TextSprite): void;
|
|
48
48
|
serialize(): {
|
|
49
|
-
name: string;
|
|
50
49
|
backgroundColor: string | null;
|
|
51
50
|
color: string;
|
|
52
51
|
clipId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { Clip, ClipOptions } from
|
|
3
|
-
import { ClipStyle } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { Clip, ClipOptions } from "../../Clip";
|
|
3
|
+
import { ClipStyle } from "../../ClipStyle";
|
|
4
4
|
export interface VideoClipOptions extends ClipOptions<ClipStyle> {
|
|
5
5
|
mediaDataId: string;
|
|
6
6
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./clips";
|
|
2
|
+
export * from "./Clip";
|
|
3
|
+
export * from "./ClipStyle";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { PixiRenderer, PixiRendererInitOptions } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PixiRenderer, PixiRendererInitOptions } from "./renderer/PixiRenderer";
|
|
3
3
|
export declare const DisplaySchema: z.ZodObject<{
|
|
4
4
|
width: z.ZodNumber;
|
|
5
5
|
height: z.ZodNumber;
|
|
@@ -13,21 +13,21 @@ export declare const DisplaySchema: z.ZodObject<{
|
|
|
13
13
|
backgroundColor: string;
|
|
14
14
|
height: number;
|
|
15
15
|
}>;
|
|
16
|
-
export type DisplayOptions = Partial<Omit<PixiRendererInitOptions,
|
|
16
|
+
export type DisplayOptions = Partial<Omit<PixiRendererInitOptions, "view">> & {
|
|
17
|
+
view: HTMLCanvasElement;
|
|
18
|
+
};
|
|
17
19
|
export declare class Display {
|
|
18
20
|
private width;
|
|
19
21
|
private height;
|
|
20
22
|
private backgroundColor;
|
|
21
23
|
renderer: PixiRenderer;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
static getInstance(options?: DisplayOptions): Display;
|
|
25
|
-
init(canvas: HTMLCanvasElement): void;
|
|
26
|
-
updateInstance(options: DisplayOptions): void;
|
|
24
|
+
constructor();
|
|
25
|
+
init(options: DisplayOptions): void;
|
|
27
26
|
getWidth(): number;
|
|
28
27
|
getHeight(): number;
|
|
29
28
|
getResolution(): [number, number];
|
|
30
29
|
getBackgroundColor(): string;
|
|
30
|
+
getView(): HTMLCanvasElement;
|
|
31
31
|
setBackgroundColor(color: string): void;
|
|
32
32
|
setResolution(width: number, height: number): void;
|
|
33
33
|
getClipIdByCursorPosition(cursorX: number, cursorY: number): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./Display";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import EventEmitter3 from
|
|
2
|
-
import { EventEmitterValidEventTypes } from
|
|
1
|
+
import EventEmitter3 from "eventemitter3";
|
|
2
|
+
import { EventEmitterValidEventTypes } from "./types/EventEmitter.types";
|
|
3
3
|
export declare class EventEmitter extends EventEmitter3<EventEmitterValidEventTypes> {
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./EventEmitter";
|
|
2
|
+
export * from "./types/EventEmitter.types";
|
|
@@ -25,10 +25,10 @@ export declare enum EventsEnum {
|
|
|
25
25
|
CLIP_FILTER_REMOVED = "clip:filter:removed",
|
|
26
26
|
CLIP_EFFECT_ADDED = "clip:effect:added",
|
|
27
27
|
CLIP_EFFECT_REMOVED = "clip:effect:removed",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
LIBRARY_ADDED = "library:added",
|
|
29
|
+
LIBRARY_REMOVED = "library:removed",
|
|
30
|
+
LIBRARY_ERROR = "library:error",
|
|
31
|
+
LIBRARY_MEDIA_UPDATED = "library:media:updated",
|
|
32
32
|
SUBTITLES_ADDED = "subtitles:added",
|
|
33
33
|
SUBTITLES_REMOVED = "subtitles:removed",
|
|
34
34
|
FONT_ADDED = "font:added",
|
|
@@ -133,17 +133,17 @@ export type EventPayloadMap = {
|
|
|
133
133
|
effectId: string;
|
|
134
134
|
sourceId: string;
|
|
135
135
|
};
|
|
136
|
-
[EventsEnum.
|
|
136
|
+
[EventsEnum.LIBRARY_ADDED]: {
|
|
137
137
|
mediaDataId: string;
|
|
138
138
|
};
|
|
139
|
-
[EventsEnum.
|
|
139
|
+
[EventsEnum.LIBRARY_REMOVED]: {
|
|
140
140
|
mediaDataId: string;
|
|
141
141
|
};
|
|
142
|
-
[EventsEnum.
|
|
142
|
+
[EventsEnum.LIBRARY_ERROR]: {
|
|
143
143
|
mediaDataId: string;
|
|
144
144
|
error: Error;
|
|
145
145
|
};
|
|
146
|
-
[EventsEnum.
|
|
146
|
+
[EventsEnum.LIBRARY_MEDIA_UPDATED]: {
|
|
147
147
|
mediaDataId: string;
|
|
148
148
|
status: string;
|
|
149
149
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as PIXI from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
2
|
export interface EffectOptions {
|
|
3
3
|
sourceId: string;
|
|
4
4
|
fragmentSrc?: string;
|
|
@@ -20,7 +20,6 @@ export declare class Effect {
|
|
|
20
20
|
updateUniformsFromSprite(sprite: PIXI.Sprite): void;
|
|
21
21
|
update(currentTime: number): void;
|
|
22
22
|
serialize(): {
|
|
23
|
-
name: string;
|
|
24
23
|
options: {
|
|
25
24
|
textureWidth: number;
|
|
26
25
|
textureHeight: number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { z } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
export declare const FilterSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
|
-
name: z.ZodString;
|
|
6
5
|
sourceId: z.ZodString;
|
|
7
6
|
options: z.ZodObject<{
|
|
8
7
|
lutUrl: z.ZodString;
|
|
@@ -12,14 +11,12 @@ export declare const FilterSchema: z.ZodObject<{
|
|
|
12
11
|
lutUrl: string;
|
|
13
12
|
}>;
|
|
14
13
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
name: string;
|
|
16
14
|
options: {
|
|
17
15
|
lutUrl: string;
|
|
18
16
|
};
|
|
19
17
|
id: string;
|
|
20
18
|
sourceId: string;
|
|
21
19
|
}, {
|
|
22
|
-
name: string;
|
|
23
20
|
options: {
|
|
24
21
|
lutUrl: string;
|
|
25
22
|
};
|
|
@@ -41,7 +38,6 @@ export declare class Filter {
|
|
|
41
38
|
getSourceId(): string;
|
|
42
39
|
getPixiFilter(): PIXI.Filter;
|
|
43
40
|
serialize(): {
|
|
44
|
-
name: string;
|
|
45
41
|
options: {
|
|
46
42
|
lutUrl: string;
|
|
47
43
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./Filter";
|
|
2
|
+
export * from "./Effect";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./FontRegistry";
|