UNPKG

@pmndrs/uikit

Version:

Build performant 3D user interfaces with Three.js and yoga.

23 lines (22 loc) 1.09 kB
import { ThreeEventMap } from '../events.js'; import { ImageProperties } from './image.js'; export type VideoProperties<EM extends ThreeEventMap = ThreeEventMap> = Omit<ImageProperties<EM>, 'src'> & InternalVideoProperties; type InternalVideoProperties = { /** * when a HtmlVideoElement is provided to src, properties like `volume`, ... are not applied */ src?: string | MediaStream | HTMLVideoElement; volume?: number; preservesPitch?: boolean; playbackRate?: number; muted?: boolean; loop?: boolean; autoplay?: boolean; crossOrigin?: string; }; /** * @requires that the element is attached to the document and therefore should be hidden (position = 'absolute', width = '1px', zIndex = '-1000', top = '0px', left = '0px') */ export declare function updateVideoElement(element: HTMLVideoElement, { src, autoplay, loop, muted, playbackRate, preservesPitch, volume, crossOrigin }: InternalVideoProperties): void; export declare function setupVideoElementInvalidation(element: HTMLVideoElement, invalidate: () => void): () => void; export {};