@cesdk/cesdk-js 1.9.0 → 1.9.2

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/index.d.ts CHANGED
@@ -496,6 +496,11 @@ declare interface AssetsQueryResult_2 {
496
496
  total: number;
497
497
  }
498
498
 
499
+ /** @public */
500
+ declare interface AudioElement extends _AssetElement {
501
+ duration: number;
502
+ }
503
+
499
504
  /**
500
505
  * Bleed margin configuration options for a single design unit type.
501
506
  * @public
@@ -544,7 +549,20 @@ export declare class BlockAPI {
544
549
  * @returns A promise that resolves with an array of the exported image and mask or is rejected with an error.
545
550
  */
546
551
  exportWithColorMask(handle: DesignBlockId, mimeType: MimeType_2 | undefined, maskColorR: number, maskColorG: number, maskColorB: number, options?: EngineExportOptions): Promise<Blob[]>;
547
-
552
+ /**
553
+ * Exports a design block as a video file of the given mime type.
554
+ * Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding.
555
+ * @param block - The design block to export.
556
+ * @param timeOffset - The time offset in seconds of the scene's timeline from which the video will start.
557
+ * @param duration - The duration in seconds of the final video.
558
+ * @param mimeType - The mime type of the output video file.
559
+ * @param resolutionWidth - The target video width in pixel.
560
+ * @param resolutionHeight - The target video height in pixel.
561
+ * @param framerate - The target framerate in Hz.
562
+ * @param progressCallback - A callback which reports on the progress of the export. It informs the receiver of the current frame index, which currently gets exported and the total frame count.
563
+ * @returns A promise that resolves with video blob or is rejected with an error.
564
+ */
565
+ exportVideo(handle: DesignBlockId, timeOffset: number, duration: number, mimeType: MimeType_2 | undefined, resolutionWidth: number, resolutionHeight: number, framerate: number, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void): Promise<Blob>;
548
566
  /**
549
567
  * Loads existing blocks from the given string.
550
568
  * The blocks are not attached by default and won't be visible until attached to a page or the scene.
@@ -2580,6 +2598,13 @@ export declare interface _EngineConfiguration {
2580
2598
  * and always create a webgl1 context.
2581
2599
  */
2582
2600
  forceWebGL1?: boolean;
2601
+ /**
2602
+ * Whether the engine should automatically choose an audio output device or
2603
+ * should not output audio at all.
2604
+ *
2605
+ * If not configured the fallback value is 'auto'.
2606
+ */
2607
+ audioOutput?: 'auto' | 'none';
2583
2608
  }
2584
2609
 
2585
2610
  /**
@@ -3442,6 +3467,15 @@ declare interface Vec3 {
3442
3467
  z: number;
3443
3468
  }
3444
3469
 
3470
+ /** @public */
3471
+ declare interface VideoElement extends _AssetElement {
3472
+ duration: number;
3473
+ size: {
3474
+ width: number;
3475
+ height: number;
3476
+ };
3477
+ }
3478
+
3445
3479
  /** @public */
3446
3480
  declare enum ViewStyle {
3447
3481
  Advanced = "advanced",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cesdk/cesdk-js",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "main": "./cesdk.umd.js",
5
5
  "types": "./index.d.ts",
6
6
  "homepage": "https://www.img.ly",