@cesdk/engine 1.59.0-nightly.20250825 → 1.59.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/assets/core/{cesdk-v1.59.0-nightly.20250825-HDPC27AU.wasm → cesdk-v1.59.0-GPWXFWSG.wasm} +0 -0
- package/assets/core/{worker-host-v1.59.0-nightly.20250825.js → worker-host-v1.59.0.js} +1 -1
- package/index.d.ts +111 -0
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.59.0-nightly.20250825-44YCFRT6.data → cesdk-v1.59.0-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -1148,6 +1148,33 @@ export declare type AudioExportOptions = {
|
|
|
1148
1148
|
*/
|
|
1149
1149
|
export declare type AudioMimeType = Extract<MimeType_2, 'audio/wav'>;
|
|
1150
1150
|
|
|
1151
|
+
/**
|
|
1152
|
+
* Information about a single audio track from a video.
|
|
1153
|
+
* This interface provides comprehensive metadata about audio tracks,
|
|
1154
|
+
* including codec information, technical specifications, and track details.
|
|
1155
|
+
* @public
|
|
1156
|
+
*/
|
|
1157
|
+
export declare interface AudioTrackInfo {
|
|
1158
|
+
/** The codec string */
|
|
1159
|
+
audioCodec: string;
|
|
1160
|
+
/** The number of audio channels */
|
|
1161
|
+
channels: number;
|
|
1162
|
+
/** The audio sample rate */
|
|
1163
|
+
sampleRate: number;
|
|
1164
|
+
/** Duration of the audio track in seconds */
|
|
1165
|
+
audioDuration: number;
|
|
1166
|
+
/** The number of audio packets (matches the number of encoded chunks) */
|
|
1167
|
+
numAudioPackets: number;
|
|
1168
|
+
/** The number of audio frames */
|
|
1169
|
+
numAudioFrames: number;
|
|
1170
|
+
/** Optional track name/label if available in metadata */
|
|
1171
|
+
trackName: string;
|
|
1172
|
+
/** Track index in the container */
|
|
1173
|
+
trackIndex: number;
|
|
1174
|
+
/** Track language code (ISO 639-2T format: "und", "eng", "deu", etc.) */
|
|
1175
|
+
language: string;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1151
1178
|
/**
|
|
1152
1179
|
* Represents the blend mode of a layer or effect.
|
|
1153
1180
|
*
|
|
@@ -1535,6 +1562,84 @@ export declare class BlockAPI {
|
|
|
1535
1562
|
* @returns The created fill's handle.
|
|
1536
1563
|
*/
|
|
1537
1564
|
createFill(type: FillType): DesignBlockId;
|
|
1565
|
+
/**
|
|
1566
|
+
* Gets the number of available audio tracks in a video fill block.
|
|
1567
|
+
*
|
|
1568
|
+
* ```javascript
|
|
1569
|
+
* const trackCount = engine.block.getAudioTrackCountFromVideo(videoBlock);
|
|
1570
|
+
* console.log(`Video has ${trackCount} audio tracks`);
|
|
1571
|
+
* ```
|
|
1572
|
+
*
|
|
1573
|
+
* @category Block Audio
|
|
1574
|
+
* @param videoFillBlock - The video fill block to examine.
|
|
1575
|
+
* @returns The number of audio tracks.
|
|
1576
|
+
* @throws Will throw an error if the block is not a video fill or has no audio.
|
|
1577
|
+
*/
|
|
1578
|
+
getAudioTrackCountFromVideo(videoFillBlock: DesignBlockId): number;
|
|
1579
|
+
/**
|
|
1580
|
+
* Creates a new audio block by extracting a specific audio track from a video fill block.
|
|
1581
|
+
*
|
|
1582
|
+
* ```javascript
|
|
1583
|
+
* // Extract the first audio track (usually the main mix)
|
|
1584
|
+
* const audioBlock = engine.block.createAudioFromVideo(videoFillBlock, 0);
|
|
1585
|
+
*
|
|
1586
|
+
* // Extract a specific track and mute the original video
|
|
1587
|
+
* const dialogueTrack = engine.block.createAudioFromVideo(videoFillBlock, 1, true);
|
|
1588
|
+
* ```
|
|
1589
|
+
*
|
|
1590
|
+
* @category Block Audio
|
|
1591
|
+
* @param videoFillBlock - The video fill block to extract audio from.
|
|
1592
|
+
* @param trackIndex - The index of the audio track to extract (0-based).
|
|
1593
|
+
* @param muteOriginalVideo - If true, mutes the audio of the original video fill block (default: false).
|
|
1594
|
+
* @returns The handle of the newly created audio block with extracted audio from the specified track.
|
|
1595
|
+
* @throws Will throw an error if the track index is invalid or the block has no audio.
|
|
1596
|
+
*/
|
|
1597
|
+
createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, muteOriginalVideo?: boolean): DesignBlockId;
|
|
1598
|
+
/**
|
|
1599
|
+
* Creates multiple audio blocks by extracting all audio tracks from a video fill block.
|
|
1600
|
+
*
|
|
1601
|
+
* ```javascript
|
|
1602
|
+
* // Extract all audio tracks from a video
|
|
1603
|
+
* const audioBlocks = engine.block.createAudiosFromVideo(videoFillBlock);
|
|
1604
|
+
* console.log(`Created ${audioBlocks.length} audio blocks`);
|
|
1605
|
+
*
|
|
1606
|
+
* // Extract all tracks and mute the original video
|
|
1607
|
+
* const audioBlocks = engine.block.createAudiosFromVideo(videoFillBlock, true);
|
|
1608
|
+
* ```
|
|
1609
|
+
*
|
|
1610
|
+
* @category Block Audio
|
|
1611
|
+
* @param videoFillBlock - The video fill block to extract audio from.
|
|
1612
|
+
* @param muteOriginalVideo - If true, mutes the audio of the original video fill block (default: false).
|
|
1613
|
+
* @returns An array of handles for the newly created audio blocks, one per track.
|
|
1614
|
+
* @throws Will throw an error if the block has no audio or extraction fails.
|
|
1615
|
+
*/
|
|
1616
|
+
createAudiosFromVideo(videoFillBlock: DesignBlockId, muteOriginalVideo?: boolean): DesignBlockId[];
|
|
1617
|
+
/**
|
|
1618
|
+
* Gets information about all audio tracks from a video fill block.
|
|
1619
|
+
*
|
|
1620
|
+
* ```javascript
|
|
1621
|
+
* // Get information about all audio tracks
|
|
1622
|
+
* const trackInfos = engine.block.getAudioInfoFromVideo(videoFillBlock);
|
|
1623
|
+
* console.log(`Video has ${trackInfos.length} audio tracks`);
|
|
1624
|
+
*
|
|
1625
|
+
* // Display track information
|
|
1626
|
+
* trackInfos.forEach((track, index) => {
|
|
1627
|
+
* console.log(`Track ${index}: ${track.channels} channels, ${track.sampleRate}Hz, ${track.language}`);
|
|
1628
|
+
* });
|
|
1629
|
+
*
|
|
1630
|
+
* // Use track info to create audio blocks selectively
|
|
1631
|
+
* const englishTracks = trackInfos.filter(track => track.language === 'eng');
|
|
1632
|
+
* const audioBlocks = englishTracks.map(track =>
|
|
1633
|
+
* engine.block.createAudioFromVideo(videoFillBlock, track.trackIndex)
|
|
1634
|
+
* );
|
|
1635
|
+
* ```
|
|
1636
|
+
*
|
|
1637
|
+
* @category Block Audio
|
|
1638
|
+
* @param videoFillBlock - The video fill block to analyze for audio track information.
|
|
1639
|
+
* @returns An array containing information about each audio track.
|
|
1640
|
+
* @throws Will throw an error if the block is not a video fill or has no audio.
|
|
1641
|
+
*/
|
|
1642
|
+
getAudioInfoFromVideo(videoFillBlock: DesignBlockId): AudioTrackInfo[];
|
|
1538
1643
|
/**
|
|
1539
1644
|
* Creates new caption blocks from an SRT or VTT file URI.
|
|
1540
1645
|
*
|
|
@@ -5695,6 +5800,12 @@ export declare type DesignBlockTypeShorthand = 'scene' | 'stack' | 'camera' | 'p
|
|
|
5695
5800
|
*/
|
|
5696
5801
|
export declare type DesignUnit = 'Pixel' | 'Millimeter' | 'Inch';
|
|
5697
5802
|
|
|
5803
|
+
/**
|
|
5804
|
+
* Information about a single audio track from a video.
|
|
5805
|
+
* This interface provides comprehensive metadata about audio tracks,
|
|
5806
|
+
* including codec information, technical specifications, and track details.
|
|
5807
|
+
* @public
|
|
5808
|
+
*/
|
|
5698
5809
|
/**
|
|
5699
5810
|
* Options for configuring drop shadow effects on blocks.
|
|
5700
5811
|
* @public
|