@rendley/sdk 1.3.0 → 1.4.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.
package/dist/Engine.d.ts CHANGED
@@ -4,14 +4,29 @@ import { Display, DisplayOptions } from "./modules/display/Display";
4
4
  import { EventEmitter } from "./modules/event-emitter";
5
5
  import { FontRegistry } from "./modules/font-registry";
6
6
  import { Library } from "./modules/library";
7
+ import { Settings } from "./modules/settings";
7
8
  import { StorageProviderBase } from "./modules/storage";
8
9
  import { StorageController } from "./modules/storage/StorageController";
9
10
  import { SubtitlesManager } from "./modules/subtitleManager";
10
11
  import { Timeline } from "./modules/timeline/Timeline";
12
+ export declare enum ExportVideoType {
13
+ VIDEO_ONLY = "video_only",
14
+ AUDIO_ONLY = "audio_only",
15
+ VIDEO_AUDIO = "video_audio"
16
+ }
11
17
  interface EngineLicense {
12
18
  licenseName: string;
13
19
  licenseKey: string;
14
20
  }
21
+ interface ExportResult {
22
+ blob: Blob;
23
+ extension: "aac" | "mp4";
24
+ }
25
+ interface ExportOptions {
26
+ type?: ExportVideoType;
27
+ from?: number;
28
+ to?: number;
29
+ }
15
30
  export interface EngineOptions {
16
31
  display?: DisplayOptions;
17
32
  license?: EngineLicense;
@@ -28,6 +43,7 @@ export declare class Engine {
28
43
  private fontRegistry;
29
44
  private subtitlesManager;
30
45
  private storageController;
46
+ private settings;
31
47
  readonly events: EventEmitter;
32
48
  private initialized;
33
49
  private rendering;
@@ -43,13 +59,14 @@ export declare class Engine {
43
59
  getDisplay(): Display;
44
60
  getTimeline(): Timeline;
45
61
  getLibrary(): Library;
62
+ getSettings(): Settings;
46
63
  getFontRegistry(): FontRegistry;
47
64
  getSubtitlesManager(): SubtitlesManager;
48
65
  getStorageController(): StorageController;
49
66
  isInitialized(): boolean;
50
67
  isRendering(): boolean;
51
68
  private generateMix;
52
- export(path?: string): Promise<Blob>;
69
+ export(payload?: ExportOptions): Promise<ExportResult>;
53
70
  play(): Promise<void>;
54
71
  pause(): Promise<void>;
55
72
  stop(): Promise<void>;
@@ -60,6 +77,7 @@ export declare class Engine {
60
77
  getClipsIdsForPoint(x: number, y: number): null;
61
78
  setSubtitles(subtitlesId: string, offset: number): void;
62
79
  shouldSplitAudio(): boolean;
80
+ getFrameAsBase64Image(time?: number, mimeType?: "image/jpeg" | "image/webp" | "image/png", quality?: number): Promise<string>;
63
81
  customClipTypes: Map<string, CustomClipConstructor>;
64
82
  registerCustomClip<T extends CustomClip = CustomClip>(classType: CustomClipConstructor<T>, typeEnum: string): void;
65
83
  callStaticCustomClipMethod(typeEnum: string, methodName: string, ...args: any[]): any;
@@ -90,6 +108,7 @@ export declare class Engine {
90
108
  transitionSrc: string;
91
109
  }[];
92
110
  }[];
111
+ fitDuration: number;
93
112
  };
94
113
  library: {
95
114
  subtitles: {
@@ -109,6 +128,7 @@ export declare class Engine {
109
128
  permanentUrl?: string | undefined;
110
129
  hash?: string | undefined;
111
130
  mimeType?: string | undefined;
131
+ customData?: [string, unknown][] | undefined;
112
132
  }[];
113
133
  };
114
134
  subtitlesManager: {
@@ -118,7 +138,7 @@ export declare class Engine {
118
138
  mainTextStyle: {
119
139
  fontSize?: number | undefined;
120
140
  color?: string | undefined;
121
- fontWeight?: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
141
+ fontWeight?: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
122
142
  fontFamily?: string | undefined;
123
143
  fontStyle?: "normal" | "italic" | "oblique" | undefined;
124
144
  wordWrapWidth?: number | null | undefined;
@@ -128,7 +148,7 @@ export declare class Engine {
128
148
  highlightTextStyle: {
129
149
  color?: string | undefined;
130
150
  fontSize?: number | undefined;
131
- fontWeight?: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
151
+ fontWeight?: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
132
152
  fontFamily?: string | undefined;
133
153
  fontStyle?: "normal" | "italic" | "oblique" | undefined;
134
154
  backgroundColor?: string | undefined;
@@ -139,6 +159,10 @@ export declare class Engine {
139
159
  };
140
160
  version?: string | undefined;
141
161
  projectId?: string | undefined;
162
+ settings?: {
163
+ preferredDecodingAcceleration: import("./modules/settings").PreferredAcceleration;
164
+ preferredEncodingAcceleration: import("./modules/settings").PreferredAcceleration;
165
+ } | undefined;
142
166
  };
143
167
  static deserialize(data: object): Promise<Engine | undefined>;
144
168
  }