@cesdk/node 1.63.0-nightly.20251022 → 1.63.0-nightly.20251024

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
@@ -1183,6 +1183,24 @@ export declare type AudioExportOptions = {
1183
1183
  abortSignal?: AbortSignal;
1184
1184
  };
1185
1185
 
1186
+ /**
1187
+ * Options for configuring audio extraction from video operations.
1188
+ * @public
1189
+ */
1190
+ export declare type AudioFromVideoOptions = {
1191
+ /**
1192
+ * If true, the audio block will have the same duration, trim length, and trim offset as the source video.
1193
+ * If false, the full audio track is extracted without trim settings.
1194
+ * @defaultValue true
1195
+ */
1196
+ keepTrimSettings?: boolean;
1197
+ /**
1198
+ * If true, mutes the audio of the original video fill block.
1199
+ * @defaultValue true
1200
+ */
1201
+ muteOriginalVideo?: boolean;
1202
+ };
1203
+
1186
1204
  /**
1187
1205
  * Represents the audio MIME types used in the editor.
1188
1206
  *
@@ -1628,40 +1646,46 @@ export declare class BlockAPI {
1628
1646
  * Creates a new audio block by extracting a specific audio track from a video fill block.
1629
1647
  *
1630
1648
  * ```javascript
1631
- * // Extract the first audio track (usually the main mix)
1649
+ * // Extract the first audio track (usually the main mix) with trim settings
1632
1650
  * const audioBlock = engine.block.createAudioFromVideo(videoFillBlock, 0);
1633
1651
  *
1634
- * // Extract a specific track and mute the original video
1635
- * const dialogueTrack = engine.block.createAudioFromVideo(videoFillBlock, 1, true);
1652
+ * // Extract full audio track without trim settings
1653
+ * const audioBlock = engine.block.createAudioFromVideo(videoFillBlock, 0, { keepTrimSettings: false });
1654
+ *
1655
+ * // Extract a specific track, keep trim settings, and mute the original video
1656
+ * const dialogueTrack = engine.block.createAudioFromVideo(videoFillBlock, 1, { keepTrimSettings: true, muteOriginalVideo: true });
1636
1657
  * ```
1637
1658
  *
1638
1659
  * @category Block Audio
1639
1660
  * @param videoFillBlock - The video fill block to extract audio from.
1640
1661
  * @param trackIndex - The index of the audio track to extract (0-based).
1641
- * @param muteOriginalVideo - If true, mutes the audio of the original video fill block (default: false).
1662
+ * @param options - Options for the audio extraction operation.
1642
1663
  * @returns The handle of the newly created audio block with extracted audio from the specified track.
1643
1664
  * @throws Will throw an error if the track index is invalid or the block has no audio.
1644
1665
  */
1645
- createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, muteOriginalVideo?: boolean): DesignBlockId;
1666
+ createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, options?: AudioFromVideoOptions): DesignBlockId;
1646
1667
  /**
1647
1668
  * Creates multiple audio blocks by extracting all audio tracks from a video fill block.
1648
1669
  *
1649
1670
  * ```javascript
1650
- * // Extract all audio tracks from a video
1671
+ * // Extract all audio tracks from a video with trim settings
1651
1672
  * const audioBlocks = engine.block.createAudiosFromVideo(videoFillBlock);
1652
1673
  * console.log(`Created ${audioBlocks.length} audio blocks`);
1653
1674
  *
1654
- * // Extract all tracks and mute the original video
1655
- * const audioBlocks = engine.block.createAudiosFromVideo(videoFillBlock, true);
1675
+ * // Extract all tracks without trim settings (full audio)
1676
+ * const audioBlocks = engine.block.createAudiosFromVideo(videoFillBlock, { keepTrimSettings: false });
1677
+ *
1678
+ * // Extract all tracks with trim settings and mute the original video
1679
+ * const audioBlocks = engine.block.createAudiosFromVideo(videoFillBlock, { keepTrimSettings: true, muteOriginalVideo: true });
1656
1680
  * ```
1657
1681
  *
1658
1682
  * @category Block Audio
1659
1683
  * @param videoFillBlock - The video fill block to extract audio from.
1660
- * @param muteOriginalVideo - If true, mutes the audio of the original video fill block (default: false).
1684
+ * @param options - Options for the audio extraction operation.
1661
1685
  * @returns An array of handles for the newly created audio blocks, one per track.
1662
1686
  * @throws Will throw an error if the block has no audio or extraction fails.
1663
1687
  */
1664
- createAudiosFromVideo(videoFillBlock: DesignBlockId, muteOriginalVideo?: boolean): DesignBlockId[];
1688
+ createAudiosFromVideo(videoFillBlock: DesignBlockId, options?: AudioFromVideoOptions): DesignBlockId[];
1665
1689
  /**
1666
1690
  * Gets information about all audio tracks from a video fill block.
1667
1691
  *
@@ -3290,6 +3314,35 @@ export declare class BlockAPI {
3290
3314
  * @param id - The block whose crop should be updated.
3291
3315
  */
3292
3316
  flipCropVertical(id: DesignBlockId): void;
3317
+ /**
3318
+ * Checks if the crop aspect ratio is locked for a block.
3319
+ *
3320
+ * When locked, crop handles will maintain the current aspect ratio during resize.
3321
+ *
3322
+ * ```javascript
3323
+ * const isLocked = engine.block.isCropAspectRatioLocked(block);
3324
+ * ```
3325
+ *
3326
+ * @category Block Crop
3327
+ * @param id - The block to query.
3328
+ * @returns True if aspect ratio is locked, false otherwise.
3329
+ */
3330
+ isCropAspectRatioLocked(id: DesignBlockId): boolean;
3331
+ /**
3332
+ * Sets whether the crop aspect ratio should be locked for a block.
3333
+ *
3334
+ * When enabled, crop handles will maintain the current aspect ratio.
3335
+ * When disabled, free resizing is allowed.
3336
+ *
3337
+ * ```javascript
3338
+ * engine.block.setCropAspectRatioLocked(block, true);
3339
+ * ```
3340
+ *
3341
+ * @category Block Crop
3342
+ * @param id - The block to update.
3343
+ * @param locked - Whether aspect ratio should be locked.
3344
+ */
3345
+ setCropAspectRatioLocked(id: DesignBlockId, locked: boolean): void;
3293
3346
  /**
3294
3347
  * Checks if a block has an opacity property.
3295
3348
  *
@@ -8424,6 +8477,21 @@ export declare type TypefaceDefinition = {
8424
8477
  }[];
8425
8478
  };
8426
8479
 
8480
+ /**
8481
+ * Specifies options for configuring audio extraction from video operations.
8482
+ *
8483
+ * The `UBQAudioFromVideoOptions` interface provides a set of properties that control the
8484
+ * behavior of the audio extraction operation.
8485
+ *
8486
+ * Methods for configuring audio extraction from video operations.
8487
+ *
8488
+ * @public
8489
+ */
8490
+ declare interface UBQAudioFromVideoOptions {
8491
+ keepTrimSettings: boolean;
8492
+ muteOriginalVideo: boolean;
8493
+ }
8494
+
8427
8495
  /**
8428
8496
  * Specifies options for exporting audio design blocks to various formats.
8429
8497
  *