@rendley/sdk 1.7.2 → 1.8.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.
@@ -34,6 +34,7 @@ export interface FFMessageRenderSettings {
34
34
  latencyMode: LatencyMode;
35
35
  outputPath?: string;
36
36
  codec?: "h264" | "vp8" | "vp9";
37
+ forcedCodecRFCString?: string;
37
38
  useWebCodecsVideoEncoder?: boolean;
38
39
  hasAlpha?: boolean;
39
40
  deadline?: number;
@@ -29,7 +29,7 @@ export declare class AudioClip extends Clip {
29
29
  private endedCallback;
30
30
  private errorCallback;
31
31
  private audioLoadedCallback;
32
- private isAudioReady;
32
+ isReady(): boolean;
33
33
  setVolume(volume: number): void;
34
34
  getVolume(): number;
35
35
  private play;
@@ -36,6 +36,7 @@ declare const HtmlTextStyleSchema: zod.ZodObject<{
36
36
  padding: number;
37
37
  wordWrapWidth: number;
38
38
  wordWrap: boolean;
39
+ stroke: string;
39
40
  breakWords: boolean;
40
41
  dropShadow: boolean;
41
42
  dropShadowAlpha: number;
@@ -46,7 +47,6 @@ declare const HtmlTextStyleSchema: zod.ZodObject<{
46
47
  fontVariant: "normal" | "small-caps";
47
48
  letterSpacing: number;
48
49
  lineHeight: number;
49
- stroke: string;
50
50
  whiteSpace: "pre" | "normal" | "pre-line";
51
51
  }, {
52
52
  align?: "left" | "center" | "right" | "justify" | undefined;
@@ -99,6 +99,7 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
99
99
  padding: number;
100
100
  wordWrapWidth: number;
101
101
  wordWrap: boolean;
102
+ stroke: string;
102
103
  breakWords: boolean;
103
104
  dropShadow: boolean;
104
105
  dropShadowAlpha: number;
@@ -109,7 +110,6 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
109
110
  fontVariant: "normal" | "small-caps";
110
111
  letterSpacing: number;
111
112
  lineHeight: number;
112
- stroke: string;
113
113
  whiteSpace: "pre" | "normal" | "pre-line";
114
114
  };
115
115
  loadFonts(fonts: string[]): Promise<void>;
@@ -156,6 +156,7 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
156
156
  padding: number;
157
157
  wordWrapWidth: number;
158
158
  wordWrap: boolean;
159
+ stroke: string;
159
160
  breakWords: boolean;
160
161
  dropShadow: boolean;
161
162
  dropShadowAlpha: number;
@@ -166,7 +167,6 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
166
167
  fontVariant: "normal" | "small-caps";
167
168
  letterSpacing: number;
168
169
  lineHeight: number;
169
- stroke: string;
170
170
  whiteSpace: "pre" | "normal" | "pre-line";
171
171
  };
172
172
  text?: string | undefined;
@@ -11,8 +11,8 @@ interface ShapeClipStyleOptions extends ClipStyleOptions {
11
11
  export declare const ShapeStyleSchema: z.ZodObject<{
12
12
  height: z.ZodOptional<z.ZodNumber>;
13
13
  width: z.ZodOptional<z.ZodNumber>;
14
- mediaDataId: z.ZodOptional<z.ZodString>;
15
14
  clipId: z.ZodString;
15
+ mediaDataId: z.ZodOptional<z.ZodString>;
16
16
  alpha: z.ZodNumber;
17
17
  rotation: z.ZodNumber;
18
18
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
@@ -18,8 +18,8 @@ interface TextClipStyleOptions extends ClipStyleOptions {
18
18
  export declare const TextStyleSchema: z.ZodObject<{
19
19
  height: z.ZodOptional<z.ZodNumber>;
20
20
  width: z.ZodOptional<z.ZodNumber>;
21
- mediaDataId: z.ZodOptional<z.ZodString>;
22
21
  clipId: z.ZodString;
22
+ mediaDataId: z.ZodOptional<z.ZodString>;
23
23
  alpha: z.ZodNumber;
24
24
  rotation: z.ZodNumber;
25
25
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
@@ -23,8 +23,11 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
23
23
  private frameQueue;
24
24
  private isRendering;
25
25
  private decoderFlushed;
26
+ private callbacks;
26
27
  constructor(options: VideoClipOptions);
27
28
  init(layerId: string): Promise<void>;
29
+ getLeftRenderBound(): number;
30
+ getRightRenderBound(): number;
28
31
  private getGlobalTimeToClipTime;
29
32
  getIsProcessing(): boolean;
30
33
  updateMediaData(newMediaId?: string): Promise<boolean>;
@@ -39,6 +42,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
39
42
  private videoLoadedCallback;
40
43
  private isVideoReady;
41
44
  private isAudioReady;
45
+ isReady(): boolean;
42
46
  setVolume(volume: number): void;
43
47
  getVolume(): number;
44
48
  private play;
@@ -5,6 +5,9 @@ import { GifClipOptions } from "../clip/clips/gif/GifClip";
5
5
  import { LottieClipOptions } from "../clip/clips/lottie/LottieClip";
6
6
  import { ShapeClipOptions } from "../clip/clips/shape/ShapeClip";
7
7
  import { Transition, TransitionOptions } from "../transition/Transition";
8
+ interface AddClipOptions {
9
+ adjustLayout?: boolean;
10
+ }
8
11
  type ClipOptionsUnion = ClipOptions | ImageClipOptions | VideoClipOptions | TextClipOptions | AudioClipOptions | GifClipOptions | ShapeClipOptions | HtmlTextClipOptions | LottieClipOptions;
9
12
  export declare const LayerSchema: z.ZodObject<{
10
13
  id: z.ZodString;
@@ -42,7 +45,6 @@ export declare const LayerSchema: z.ZodObject<{
42
45
  }>, "many">;
43
46
  }, "strip", z.ZodTypeAny, {
44
47
  id: string;
45
- clips: any[];
46
48
  transitions: {
47
49
  name: string;
48
50
  type: "transition";
@@ -53,12 +55,12 @@ export declare const LayerSchema: z.ZodObject<{
53
55
  outDuration: number;
54
56
  transitionSrc: string;
55
57
  }[];
58
+ clips: any[];
56
59
  visible?: boolean | undefined;
57
60
  muted?: boolean | undefined;
58
61
  volume?: number | undefined;
59
62
  }, {
60
63
  id: string;
61
- clips: any[];
62
64
  transitions: {
63
65
  name: string;
64
66
  type: "transition";
@@ -69,6 +71,7 @@ export declare const LayerSchema: z.ZodObject<{
69
71
  outDuration: number;
70
72
  transitionSrc: string;
71
73
  }[];
74
+ clips: any[];
72
75
  visible?: boolean | undefined;
73
76
  muted?: boolean | undefined;
74
77
  volume?: number | undefined;
@@ -85,8 +88,8 @@ export declare class Layer {
85
88
  constructor();
86
89
  init(): Promise<void>;
87
90
  destroy(): void;
88
- addClip(options: Clip): Promise<Clip | null>;
89
- addClip(options: ClipOptionsUnion): Promise<Clip | null>;
91
+ addClip(clipOptions: Clip, addClipOptions?: AddClipOptions): Promise<Clip | null>;
92
+ addClip(clipOptions: ClipOptionsUnion, addClipOptions?: AddClipOptions): Promise<Clip | null>;
90
93
  removeClip(clipId: string): boolean;
91
94
  setVolume(volume: number): void;
92
95
  getVolume(): number;
@@ -114,7 +117,6 @@ export declare class Layer {
114
117
  private createClip;
115
118
  serialize(): {
116
119
  id: string;
117
- clips: any[];
118
120
  transitions: {
119
121
  name: string;
120
122
  type: "transition";
@@ -125,6 +127,7 @@ export declare class Layer {
125
127
  outDuration: number;
126
128
  transitionSrc: string;
127
129
  }[];
130
+ clips: any[];
128
131
  visible?: boolean | undefined;
129
132
  muted?: boolean | undefined;
130
133
  volume?: number | undefined;
@@ -39,6 +39,7 @@ export declare class Settings {
39
39
  private m3u8MaxResolution;
40
40
  private showRenderPreview;
41
41
  private encoderCodec;
42
+ private encoderForcedCodecRFCString;
42
43
  private encoderBitrate;
43
44
  private encoderBitrateMode;
44
45
  private encoderPerformanceMode;
@@ -63,6 +64,8 @@ export declare class Settings {
63
64
  getEncoderUseWebCodecs(): boolean;
64
65
  setEncoderCodec(codec: VideoCodec): void;
65
66
  getEncoderCodec(): VideoCodec;
67
+ setEncoderForcedCodecRFCString(codec: string): void;
68
+ getEncoderForcedCodecRFCString(): string;
66
69
  setShowRenderPreview(show: boolean): void;
67
70
  getShowRenderPreview(): boolean;
68
71
  setDecoderPreferredAcceleration(acceleration: PreferredAcceleration): void;
@@ -45,7 +45,6 @@ export declare const TimelineSchema: z.ZodObject<{
45
45
  }>, "many">;
46
46
  }, "strip", z.ZodTypeAny, {
47
47
  id: string;
48
- clips: any[];
49
48
  transitions: {
50
49
  name: string;
51
50
  type: "transition";
@@ -56,12 +55,12 @@ export declare const TimelineSchema: z.ZodObject<{
56
55
  outDuration: number;
57
56
  transitionSrc: string;
58
57
  }[];
58
+ clips: any[];
59
59
  visible?: boolean | undefined;
60
60
  muted?: boolean | undefined;
61
61
  volume?: number | undefined;
62
62
  }, {
63
63
  id: string;
64
- clips: any[];
65
64
  transitions: {
66
65
  name: string;
67
66
  type: "transition";
@@ -72,6 +71,7 @@ export declare const TimelineSchema: z.ZodObject<{
72
71
  outDuration: number;
73
72
  transitionSrc: string;
74
73
  }[];
74
+ clips: any[];
75
75
  visible?: boolean | undefined;
76
76
  muted?: boolean | undefined;
77
77
  volume?: number | undefined;
@@ -82,7 +82,6 @@ export declare const TimelineSchema: z.ZodObject<{
82
82
  fps: number;
83
83
  layers: {
84
84
  id: string;
85
- clips: any[];
86
85
  transitions: {
87
86
  name: string;
88
87
  type: "transition";
@@ -93,6 +92,7 @@ export declare const TimelineSchema: z.ZodObject<{
93
92
  outDuration: number;
94
93
  transitionSrc: string;
95
94
  }[];
95
+ clips: any[];
96
96
  visible?: boolean | undefined;
97
97
  muted?: boolean | undefined;
98
98
  volume?: number | undefined;
@@ -103,7 +103,6 @@ export declare const TimelineSchema: z.ZodObject<{
103
103
  fps: number;
104
104
  layers: {
105
105
  id: string;
106
- clips: any[];
107
106
  transitions: {
108
107
  name: string;
109
108
  type: "transition";
@@ -114,6 +113,7 @@ export declare const TimelineSchema: z.ZodObject<{
114
113
  outDuration: number;
115
114
  transitionSrc: string;
116
115
  }[];
116
+ clips: any[];
117
117
  visible?: boolean | undefined;
118
118
  muted?: boolean | undefined;
119
119
  volume?: number | undefined;
@@ -166,7 +166,6 @@ export declare class Timeline {
166
166
  fps: number;
167
167
  layers: {
168
168
  id: string;
169
- clips: any[];
170
169
  transitions: {
171
170
  name: string;
172
171
  type: "transition";
@@ -177,6 +176,7 @@ export declare class Timeline {
177
176
  outDuration: number;
178
177
  transitionSrc: string;
179
178
  }[];
179
+ clips: any[];
180
180
  visible?: boolean | undefined;
181
181
  muted?: boolean | undefined;
182
182
  volume?: number | undefined;
@@ -38,23 +38,37 @@ export interface TransitionOptions {
38
38
  transitionSrc: string;
39
39
  }
40
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;
41
+ private id;
42
+ private name;
43
+ private transitionSrc;
44
+ private startClipId;
45
+ private endClipId;
46
+ private startClip;
47
+ private endClip;
48
+ private inDuration;
49
+ private outDuration;
50
50
  private renderTexture1;
51
51
  private renderTexture2;
52
- sprite: PIXI.Sprite;
53
- transitionFilter: PIXI.Filter;
52
+ private sprite;
53
+ private transitionFilter;
54
54
  constructor(options: TransitionOptions);
55
55
  init(layerId: string): void;
56
56
  createRendererTexture(): void;
57
- getRenderer(): PIXI.IRenderer<PIXI.ICanvas> | undefined;
57
+ getId(): string;
58
+ setInDuration(inDuration: number): void;
59
+ getInDuration(): number;
60
+ setOutDuration(outDuration: number): void;
61
+ getOutDuration(): number;
62
+ setName(name: string): void;
63
+ getName(): string;
64
+ setStartClipId(startClipId: string): void;
65
+ getStartClipId(): string;
66
+ setEndClipId(endClipId: string): void;
67
+ getEndClipId(): string;
68
+ getSprite(): PIXI.Sprite;
69
+ getStartClip(): Clip<PIXI.Sprite, import("../clip").ClipStyle<PIXI.Sprite>>;
70
+ getEndClip(): Clip<PIXI.Sprite, import("../clip").ClipStyle<PIXI.Sprite>>;
71
+ private getRenderer;
58
72
  onPlay(currentTime: number): Promise<void>;
59
73
  onPause(currentTime: number): void;
60
74
  onResize(width: number, height: number): void;
@@ -1,4 +1,5 @@
1
1
  import { Clip } from '../../modules/clip';
2
+ import { Transition } from '../../modules/transition';
2
3
  export declare class CachedAccess {
3
4
  private static instance?;
4
5
  static getInstance(): CachedAccess;
@@ -7,13 +8,17 @@ export declare class CachedAccess {
7
8
  private readonly clipIdToClip;
8
9
  private readonly mediaIdToClips;
9
10
  private readonly subtitlesIdToClips;
11
+ private readonly clipIdToTransitions;
10
12
  setClipInfo(clipId: string, layerId: string, clip: Clip): void;
11
13
  updateSubtitlesIdToClips(subtitlesIdOld: string | undefined, subtitlesId: string | undefined, clip: Clip): void;
12
14
  updateClipIdToLayerId(oldLayerId: string, newLayerId: string, clipId: string): void;
13
15
  removeClipInfo(clipId: string): void;
16
+ setTransitionInfo(transition: Transition, startClipId: string, endClipId: string): void;
17
+ removeTransitionInfo(transitionId: string): void;
14
18
  layerIdFromClipId(clipId: string): string | undefined;
15
19
  clipFromClipId(clipId: string): Clip | undefined;
16
20
  clipsFromMediaId(mediaId: string): Clip[];
17
21
  clipsFromSubtitlesId(subtitlesId: string): Clip[];
22
+ transitionsFromClipId(clipId: string): Transition[];
18
23
  destroy(): void;
19
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendley/sdk",
3
- "version": "1.7.2",
3
+ "version": "1.8.0",
4
4
  "license": "LICENSE",
5
5
  "author": "Onix Technologies",
6
6
  "homepage": "https://rendley.com",