vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
38 lines • 1.58 kB
TypeScript
import { TModuleOnCallbacksProps } from '../../base';
import { TRequiredProps } from '../../internal/requiredProps';
import { Canvas } from '../Canvas';
import { ICanvasMediaCallbacksMap, ICanvasMediaMutableProps, ICanvasMediaStaticProps } from './types';
export * from './types';
type TC = ICanvasMediaCallbacksMap;
type TS = ICanvasMediaStaticProps;
type TM = ICanvasMediaMutableProps;
/**
* The `CanvasMedia` class allows pre-rendering of media (such as images or video) onto a canvas.
* This can be useful for reducing payloads by preparing the media for further use in a more optimized form.
*
* [Documentation](https://vevetjs.com/docs/CanvasMedia)
*
* @group Components
*/
export declare class CanvasMedia extends Canvas<TC, TS, TM> {
/** Get default static properties */
_getStatic(): TRequiredProps<TS>;
/** Get default mutable properties */
_getMutable(): TRequiredProps<TM>;
constructor(props?: TS & TM & TModuleOnCallbacksProps<TC, CanvasMedia>, onCallbacks?: TModuleOnCallbacksProps<TC, CanvasMedia>);
/** Checks if the media element has the `requestVideoFrameCallback` method */
private get hasRequestVideoFrameCallback();
/** Add media events */
private _setMediaEvents;
/** Resize the canvas */
resize(): void;
/** Auto rendering for videos */
private _requestVideoFrame;
/** Pre-renders the media resource onto the canvas. */
render(): void;
/**
* Prerenders the media onto the canvas using the specified positioning rule.
*/
private _prerender;
}
//# sourceMappingURL=index.d.ts.map