@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,76 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Clip } from '../clip';
|
|
4
|
+
export declare const TransitionSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
startClipId: z.ZodString;
|
|
8
|
+
endClipId: z.ZodString;
|
|
9
|
+
inDuration: z.ZodNumber;
|
|
10
|
+
outDuration: z.ZodNumber;
|
|
11
|
+
transitionSrc: z.ZodString;
|
|
12
|
+
type: z.ZodLiteral<"transition">;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
name: string;
|
|
15
|
+
type: "transition";
|
|
16
|
+
id: string;
|
|
17
|
+
startClipId: string;
|
|
18
|
+
endClipId: string;
|
|
19
|
+
inDuration: number;
|
|
20
|
+
outDuration: number;
|
|
21
|
+
transitionSrc: string;
|
|
22
|
+
}, {
|
|
23
|
+
name: string;
|
|
24
|
+
type: "transition";
|
|
25
|
+
id: string;
|
|
26
|
+
startClipId: string;
|
|
27
|
+
endClipId: string;
|
|
28
|
+
inDuration: number;
|
|
29
|
+
outDuration: number;
|
|
30
|
+
transitionSrc: string;
|
|
31
|
+
}>;
|
|
32
|
+
export interface TransitionOptions {
|
|
33
|
+
startClipId: string;
|
|
34
|
+
endClipId: string;
|
|
35
|
+
inDuration: number;
|
|
36
|
+
outDuration: number;
|
|
37
|
+
name: string;
|
|
38
|
+
transitionSrc: string;
|
|
39
|
+
}
|
|
40
|
+
export declare class Transition {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
transitionSrc: string;
|
|
44
|
+
startClipId: string;
|
|
45
|
+
endClipId: string;
|
|
46
|
+
startClip: Clip;
|
|
47
|
+
endClip: Clip;
|
|
48
|
+
inDuration: number;
|
|
49
|
+
outDuration: number;
|
|
50
|
+
private renderTexture1;
|
|
51
|
+
private renderTexture2;
|
|
52
|
+
sprite: PIXI.Sprite;
|
|
53
|
+
transitionFilter: PIXI.Filter;
|
|
54
|
+
constructor(options: TransitionOptions);
|
|
55
|
+
init(layerId: string): void;
|
|
56
|
+
createRendererTexture(): void;
|
|
57
|
+
getRenderer(): PIXI.IRenderer<PIXI.ICanvas> | undefined;
|
|
58
|
+
onPlay(currentTime: number): Promise<void>;
|
|
59
|
+
onPause(currentTime: number): void;
|
|
60
|
+
onResize(width: number, height: number): void;
|
|
61
|
+
getTransitionProgress(currentTime: number): number;
|
|
62
|
+
render(currentTime: number): void;
|
|
63
|
+
destroy(): void;
|
|
64
|
+
update(transitionProgress: number): void;
|
|
65
|
+
serialize(): {
|
|
66
|
+
name: string;
|
|
67
|
+
type: "transition";
|
|
68
|
+
id: string;
|
|
69
|
+
startClipId: string;
|
|
70
|
+
endClipId: string;
|
|
71
|
+
inDuration: number;
|
|
72
|
+
outDuration: number;
|
|
73
|
+
transitionSrc: string;
|
|
74
|
+
};
|
|
75
|
+
static deserialize(data: object): Transition;
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Transition';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum ClipTypeEnum {
|
|
2
|
+
NONE = "none",
|
|
3
|
+
GIF = "gif",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
AUDIO = "audio",
|
|
7
|
+
TEXT = "text",
|
|
8
|
+
SHAPE = "shape",
|
|
9
|
+
AV = "av",
|
|
10
|
+
COLOR = "color",
|
|
11
|
+
GRADIENT = "gradient"
|
|
12
|
+
}
|
|
13
|
+
export declare enum WarmModeEnum {
|
|
14
|
+
CLAMP = "clamp",
|
|
15
|
+
REPEAT = "repeat",
|
|
16
|
+
PING_PONG = "ping_ping",
|
|
17
|
+
EMPTY = "empty"
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './clip.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getIosVersion(): "iOS 8 and up" | "iOS 7" | "iOS 6" | "iOS 5" | "iOS 4" | "iOS 3 or earlier" | "Not an iOS device";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isIos(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isIosSafari(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getSolidColorFromGradient(color: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fileToArrayBuffer(file: File): Promise<ArrayBuffer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFilenameFromResponse(response: Response): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toBlobURL: (url: string, mimeType: string) => Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function calculateFitScale(containerWidth: number, containerHeight: number, contentWidth: number, contentHeight: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function clampValue(value: number, min: number, max: number): number;
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rendley/sdk",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"license": "LICENSE",
|
|
5
|
+
"author": "Onix Technologies",
|
|
6
|
+
"homepage": "https://rendley.com",
|
|
7
|
+
"description": "A Video Editing SDK that works completely in the browser.",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"video editing sdk",
|
|
11
|
+
"javascript video sdk",
|
|
12
|
+
"typescript video sdk",
|
|
13
|
+
"video api",
|
|
14
|
+
"video processing",
|
|
15
|
+
"ffmpeg",
|
|
16
|
+
"video",
|
|
17
|
+
"web codecs",
|
|
18
|
+
"video editor"
|
|
19
|
+
],
|
|
20
|
+
"main": "./dist/index.cjs",
|
|
21
|
+
"module": "./dist/index.js",
|
|
22
|
+
"typings": "./dist/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"registry": "https://registry.npmjs.org/",
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"start": "cd example && npm run dev",
|
|
32
|
+
"build:docs": "typedoc",
|
|
33
|
+
"build": "tsc && vite build --mode development",
|
|
34
|
+
"build:production": "tsc && vite build --mode production",
|
|
35
|
+
"obfuscate": "node ./plugins/obfuscate.js",
|
|
36
|
+
"test": "jest"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@babel/core": "7.23.7",
|
|
40
|
+
"@babel/preset-env": "7.23.7",
|
|
41
|
+
"@babel/preset-typescript": "7.23.3",
|
|
42
|
+
"@types/emscripten": "^1.39.10",
|
|
43
|
+
"@types/eventemitter3": "2.0.2",
|
|
44
|
+
"@types/gradient-parser": "^0.1.5",
|
|
45
|
+
"@types/jest": "29.5.11",
|
|
46
|
+
"@types/node": "20.10.6",
|
|
47
|
+
"@types/uuid": "9.0.8",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "6.17.0",
|
|
49
|
+
"@typescript-eslint/parser": "6.17.0",
|
|
50
|
+
"babel-jest": "29.7.0",
|
|
51
|
+
"eslint": "8.56.0",
|
|
52
|
+
"eslint-plugin-import": "2.29.1",
|
|
53
|
+
"javascript-obfuscator": "4.1.0",
|
|
54
|
+
"jest": "29.7.0",
|
|
55
|
+
"lerna": "8.0.1",
|
|
56
|
+
"prettier": "3.1.1",
|
|
57
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
58
|
+
"ts-jest": "29.1.1",
|
|
59
|
+
"typedoc": "^0.25.12",
|
|
60
|
+
"typescript": "5.3.3",
|
|
61
|
+
"vite": "5.0.12",
|
|
62
|
+
"vite-plugin-dts": "3.7.2"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@pixi/filter-ascii": "^5.1.1",
|
|
66
|
+
"@pixi/filter-old-film": "^5.1.1",
|
|
67
|
+
"@pixi/gif": "^2.1.1",
|
|
68
|
+
"eventemitter3": "5.0.1",
|
|
69
|
+
"gradient-parser": "^1.0.2",
|
|
70
|
+
"mp4-muxer": "^4.1.0",
|
|
71
|
+
"pixi.js": "7.4.0",
|
|
72
|
+
"uuid": "9.0.1",
|
|
73
|
+
"zod": "3.22.4"
|
|
74
|
+
}
|
|
75
|
+
}
|