@cesdk/engine 1.8.0-alpha.5 → 1.8.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/index.d.ts
CHANGED
|
@@ -367,6 +367,12 @@ export declare type BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply'
|
|
|
367
367
|
*/
|
|
368
368
|
export declare class Block extends Entity {
|
|
369
369
|
effects: ReadWriteChannelSync<number[]>;
|
|
370
|
+
soloPlaybackEnabled: ReadWriteChannelSync<boolean>;
|
|
371
|
+
trimOffset: ReadWriteChannelSync<number>;
|
|
372
|
+
trimLength: ReadWriteChannelSync<number>;
|
|
373
|
+
playing: ReadWriteChannelSync<boolean>;
|
|
374
|
+
playbackTime: ReadWriteChannelSync<number>;
|
|
375
|
+
selection: ReadWriteChannelSync<boolean>;
|
|
370
376
|
|
|
371
377
|
}
|
|
372
378
|
|
|
@@ -1708,23 +1714,26 @@ export declare class BlockAPI {
|
|
|
1708
1714
|
hasTrim(id: DesignBlockId): boolean;
|
|
1709
1715
|
/**
|
|
1710
1716
|
* Set the trim offset of the given block or fill.
|
|
1711
|
-
* Sets the
|
|
1712
|
-
* This
|
|
1717
|
+
* Sets the time in seconds within the fill at which playback of the audio or video clip should begin.
|
|
1718
|
+
* This requires the video or audio clip to be loaded.
|
|
1713
1719
|
* @param id - The block whose trim should be updated.
|
|
1714
1720
|
* @param offset - The new trim offset.
|
|
1715
1721
|
*/
|
|
1716
1722
|
setTrimOffset(id: DesignBlockId, offset: number): void;
|
|
1717
1723
|
/**
|
|
1718
1724
|
* Get the trim offset of this block.
|
|
1725
|
+
* * This requires the video or audio clip to be loaded.
|
|
1719
1726
|
* @param id - The block whose trim offset should be queried.
|
|
1720
|
-
* @returns the trim offset.
|
|
1727
|
+
* @returns the trim offset in seconds.
|
|
1721
1728
|
*/
|
|
1722
1729
|
getTrimOffset(id: DesignBlockId): number;
|
|
1723
1730
|
/**
|
|
1724
1731
|
* Set the trim length of the given block or fill.
|
|
1725
|
-
* The trim length is the
|
|
1732
|
+
* The trim length is the duration of the audio or video clip that should be used for playback.
|
|
1733
|
+
* After reaching this value during playback, the trim region will loop.
|
|
1734
|
+
* This requires the video or audio clip to be loaded.
|
|
1726
1735
|
* @param id - The object whose trim length should be updated.
|
|
1727
|
-
* @param length - The new trim length
|
|
1736
|
+
* @param length - The new trim length in seconds.
|
|
1728
1737
|
*/
|
|
1729
1738
|
setTrimLength(id: DesignBlockId, length: number): void;
|
|
1730
1739
|
/**
|
|
@@ -1786,6 +1795,24 @@ export declare class BlockAPI {
|
|
|
1786
1795
|
* @returns Whether solo playback is enabled for this block.
|
|
1787
1796
|
*/
|
|
1788
1797
|
isSoloPlaybackEnabled(id: DesignBlockId): boolean;
|
|
1798
|
+
/**
|
|
1799
|
+
* Begins loading the required audio and video resource for the given video fill or audio block.
|
|
1800
|
+
* @param id - The video fill or audio block whose resource should be loaded.
|
|
1801
|
+
* @returns A Promise that resolves once the resource has finished loading.
|
|
1802
|
+
*/
|
|
1803
|
+
forceLoadAVResource(id: DesignBlockId): Promise<void>;
|
|
1804
|
+
/**
|
|
1805
|
+
* Get the duration in seconds of the video or audio resource that is attached to the given block.
|
|
1806
|
+
* @param id - The video fill or audio block.
|
|
1807
|
+
* @returns The video or audio file duration
|
|
1808
|
+
*/
|
|
1809
|
+
getAVResourceTotalDuration(id: DesignBlockId): number;
|
|
1810
|
+
/**
|
|
1811
|
+
* Generate a thumbnail for the given video fill.
|
|
1812
|
+
* @param id - The video fill.
|
|
1813
|
+
* @returns A thumbnail encoded as PNG with a height of 128px.
|
|
1814
|
+
*/
|
|
1815
|
+
getVideoFillThumbnail(id: DesignBlockId): Promise<Blob>;
|
|
1789
1816
|
}
|
|
1790
1817
|
|
|
1791
1818
|
/**
|
|
@@ -2420,11 +2447,7 @@ declare type HexColorString = string;
|
|
|
2420
2447
|
*
|
|
2421
2448
|
* @public
|
|
2422
2449
|
*/
|
|
2423
|
-
export declare
|
|
2424
|
-
#private;
|
|
2425
|
-
constructor();
|
|
2426
|
-
connectedCallback(): void;
|
|
2427
|
-
disconnectedCallback(): void;
|
|
2450
|
+
export declare interface HTMLCreativeEngineCanvasElement extends HTMLElement {
|
|
2428
2451
|
|
|
2429
2452
|
|
|
2430
2453
|
}
|
|
@@ -2793,6 +2816,18 @@ export declare type StrokeStyle = 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDas
|
|
|
2793
2816
|
/** @public */
|
|
2794
2817
|
declare type Subscription = number;
|
|
2795
2818
|
|
|
2819
|
+
/**
|
|
2820
|
+
* Checks if the current browser supports video editing
|
|
2821
|
+
* @public
|
|
2822
|
+
*/
|
|
2823
|
+
export declare function supportsVideo(): boolean;
|
|
2824
|
+
|
|
2825
|
+
/**
|
|
2826
|
+
* Checks if the current browser supports web assembly
|
|
2827
|
+
* @public
|
|
2828
|
+
*/
|
|
2829
|
+
export declare function supportsWasm(): boolean;
|
|
2830
|
+
|
|
2796
2831
|
/** @public */
|
|
2797
2832
|
declare type TemplateDefinition = Preset & {
|
|
2798
2833
|
label: string;
|