UNPKG

@kbss-cvut/s-forms

Version:

Semantic forms generator and processor

24 lines (23 loc) 1.21 kB
export default AnnotationRenderer; /** * Renders time-based visual annotations as an SVG overlay on top of a media asset. * * The component is purely presentational and does not manage interaction or state. * It filters annotations by playback time, denormalizes geometry into viewport * pixel space, and delegates rendering to annotation-specific components. * * @component * * @param {number} mediaAssetViewportWidth - Width of the media asset viewport in pixels. * @param {number} mediaAssetViewportHeight - Height of the media asset viewport in pixels. * @param {Array<Object>} annotations - List of annotations using normalized coordinates (0–1). * @param {number|null} playerCurrentTime - Current playback time in seconds; if null, all annotations are rendered. * * @returns {JSX.Element} SVG overlay containing rendered annotations. * * @remarks * - Accepts annotations defined in a normalized coordinate system (0–1) * - Default styles are resolved via Constants to ensure consistency * - Supports polyline and text annotation types */ declare function AnnotationRenderer({ mediaAssetViewportWidth, mediaAssetViewportHeight, annotations, playerCurrentTime, }: number): JSX.Element;