@shotstack/shotstack-studio 2.11.3 → 2.11.5

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/index.d.ts CHANGED
@@ -48,12 +48,28 @@ export declare class Canvas {
48
48
  setZoom(zoom: number): void;
49
49
  getZoom(): number;
50
50
  /**
51
- * Capture the current canvas content as a base64-encoded data URL.
51
+ * Capture the rendered output frame as a base64-encoded data URL.
52
+ *
53
+ * Renders the composition full-bleed at the edit's output resolution, independent of the
54
+ * editor's current zoom and pan — the rendered frame only, without the surrounding canvas
55
+ * margin, selection handles, or alignment guides. Use {@link captureViewport} to capture
56
+ * the on-screen editor view instead.
52
57
  */
53
58
  captureFrame(options?: {
54
59
  format?: "png" | "jpeg" | "webp";
55
60
  quality?: number;
56
61
  }): Promise<string>;
62
+ /**
63
+ * Capture the on-screen editor viewport as a base64-encoded data URL.
64
+ *
65
+ * Reflects the editor's current zoom, pan, and surrounding canvas — what the user sees.
66
+ * Use {@link captureFrame} for the full-bleed rendered output frame.
67
+ */
68
+ captureViewport(options?: {
69
+ format?: "png" | "jpeg" | "webp";
70
+ quality?: number;
71
+ }): Promise<string>;
72
+ private extractBase64;
57
73
  /**
58
74
  * Sync overlay container and toolbar positions after content transforms change.
59
75
  * Single point of update for all position-dependent UI elements.
@@ -304,13 +320,33 @@ export declare class Edit {
304
320
  getOutputResolution(): string | undefined;
305
321
  setOutputAspectRatio(aspectRatio: string): Promise<void>;
306
322
  /**
307
- * Capture the current canvas as a base64 data URL.
323
+ * Capture the rendered output frame as a base64 data URL.
324
+ *
325
+ * Full-bleed at the edit's output resolution, independent of the editor's zoom and pan. Pass
326
+ * `time` to capture a specific playhead position. Use {@link captureViewport} for the
327
+ * on-screen editor view.
308
328
  */
309
329
  captureFrame(options?: {
310
330
  time?: number;
311
331
  format?: "png" | "jpeg" | "webp";
312
332
  quality?: number;
313
333
  }): Promise<string>;
334
+ /**
335
+ * Capture the on-screen editor viewport as a base64 data URL.
336
+ *
337
+ * Reflects the editor's current zoom, pan, and surrounding canvas. Pass `time` to capture a
338
+ * specific playhead position. Use {@link captureFrame} for the full-bleed output frame.
339
+ */
340
+ captureViewport(options?: {
341
+ time?: number;
342
+ format?: "png" | "jpeg" | "webp";
343
+ quality?: number;
344
+ }): Promise<string>;
345
+ /**
346
+ * Seek (when `time` is given), project html5 video frames into the scene, run `capture`, then
347
+ * release the static-render state. Shared by {@link captureFrame} and {@link captureViewport}.
348
+ */
349
+ private captureStatic;
314
350
  /**
315
351
  * Atomically apply multiple output settings.
316
352
  */
@@ -793,7 +829,6 @@ export declare class VideoExporter {
793
829
  private prepareConfig;
794
830
  private saveEditState;
795
831
  private restoreEditState;
796
- private isVideoPlayer;
797
832
  }
798
833
 
799
834
  export { }
@@ -209,13 +209,33 @@ export declare class Edit {
209
209
  getOutputResolution(): string | undefined;
210
210
  setOutputAspectRatio(aspectRatio: string): Promise<void>;
211
211
  /**
212
- * Capture the current canvas as a base64 data URL.
212
+ * Capture the rendered output frame as a base64 data URL.
213
+ *
214
+ * Full-bleed at the edit's output resolution, independent of the editor's zoom and pan. Pass
215
+ * `time` to capture a specific playhead position. Use {@link captureViewport} for the
216
+ * on-screen editor view.
213
217
  */
214
218
  captureFrame(options?: {
215
219
  time?: number;
216
220
  format?: "png" | "jpeg" | "webp";
217
221
  quality?: number;
218
222
  }): Promise<string>;
223
+ /**
224
+ * Capture the on-screen editor viewport as a base64 data URL.
225
+ *
226
+ * Reflects the editor's current zoom, pan, and surrounding canvas. Pass `time` to capture a
227
+ * specific playhead position. Use {@link captureFrame} for the full-bleed output frame.
228
+ */
229
+ captureViewport(options?: {
230
+ time?: number;
231
+ format?: "png" | "jpeg" | "webp";
232
+ quality?: number;
233
+ }): Promise<string>;
234
+ /**
235
+ * Seek (when `time` is given), project html5 video frames into the scene, run `capture`, then
236
+ * release the static-render state. Shared by {@link captureFrame} and {@link captureViewport}.
237
+ */
238
+ private captureStatic;
219
239
  /**
220
240
  * Atomically apply multiple output settings.
221
241
  */