Skip to main content

Video

Plays video from a URL or MediaStream, with play/pause/restart/reset signals and playback-position output.

Video renders an HTML video element. src (a string URL or project asset path) or srcObject (a MediaStream, e.g. a camera feed) supplies the media; poster shows an image before playback; autoplay, loop, muted, controls and volume map directly onto the element. Playback is driven by four signal inputs: play resumes, pause pauses, restart seeks to the start and plays, reset seeks to the start and pauses. Outputs report state: onPlay/onPause/onCanPlay are signals from the element's events, onTimeUpdate (Playback Position) is a number holding the current time in seconds, and videoWidth/videoHeight give the intrinsic size once known.

When to use it

Embedded video content, background/hero loops, and camera previews (wire a media stream to srcObject). For still pictures use Image. Browsers block unmuted autoplay — combine autoplay with muted for background video, or start playback from a user action via play.

At a glance

CategoryVisual
Type nameVideo
Available inbrowser
SSR compatibilitysafe
Provided bynoodl-viewer-react

Inputs

Values

NameTypeDefaultDescription
alignXEnum (left, center, right)Horizontal alignment of this element within the space its parent gives it
alignYEnum (top, center, bottom)Vertical alignment of this element within the space its parent gives it
autoplayBooleanStarts playing as soon as the video can; most browsers only allow this while Muted is on
blockTouchBooleanStops every pointer event that lands here from reaching the nodes this one sits inside. Blunt: it takes hover and pointer-down with it, so reach for Click Bubbling first if it is only clicks you want to keep in
borderBottomColorColorColour of the bottom edge only, overriding Border Color
borderBottomLeftRadiusNumberRounds the bottom-left corner only, overriding Corner Radius
borderBottomRightRadiusNumberRounds the bottom-right corner only, overriding Corner Radius
borderBottomStyleEnum (none, solid, dotted, dashed)Line style for the bottom edge only, overriding Border Style; None hides that edge
borderBottomWidthNumberThickness of the bottom edge in pixels, and it adds to the element's size
borderColorColor#000000Colour of the border, which has no effect while Border Style is None
borderLeftColorColorColour of the left edge only, overriding Border Color
borderLeftStyleEnum (none, solid, dotted, dashed)Line style for the left edge only, overriding Border Style; None hides that edge
borderLeftWidthNumberThickness of the left edge in pixels, and it adds to the element's size
borderRadiusNumber0Rounds all four corners, except any corner that sets its own radius
borderRightColorColorColour of the right edge only, overriding Border Color
borderRightStyleEnum (none, solid, dotted, dashed)Line style for the right edge only, overriding Border Style; None hides that edge
borderRightWidthNumberThickness of the right edge in pixels, and it adds to the element's size
borderStyleEnum (none, solid, dotted, dashed)noneLine style for all four edges; None hides the border and leaves Border Width and Color inactive
borderTopColorColorColour of the top edge only, overriding Border Color
borderTopLeftRadiusNumberRounds the top-left corner only, overriding Corner Radius
borderTopRightRadiusNumberRounds the top-right corner only, overriding Corner Radius
borderTopStyleEnum (none, solid, dotted, dashed)Line style for the top edge only, overriding Border Style; None hides that edge
borderTopWidthNumberThickness of the top edge in pixels, and it adds to the element's size
borderWidthNumber2Thickness of the border in pixels, which adds to the element's size unless Box Sizing accounts for it
clickBubblingEnum (auto, always, never)autoWhether a click here also fires Click on the nodes this one sits inside. Automatic keeps it here as soon as this node's own Click is connected, so a button inside a clickable card runs the button and not the card; Always is the older behaviour where both run; Never keeps every click here, wired or not. Note that an element at zero opacity takes no pointer events at all
controlsBooleanShows the browser's own play, seek and volume controls
cssClassNameString``Extra CSS class names to put on this element, for styling from a stylesheet you supply
heightDimension100Height of the element; how the value is read depends on Size Mode
loopBooleanRestarts the video automatically when it reaches the end
marginBottomNumberSpace outside the element's bottom edge, between it and its neighbours
marginLeftNumberSpace outside the element's left edge, between it and its neighbours
marginRightNumberSpace outside the element's right edge, between it and its neighbours
marginTopNumberSpace outside the element's top edge, between it and its neighbours
maxHeightNumberLargest height the element may grow to, taking priority over Height
maxWidthNumberLargest width the element may grow to, taking priority over Width
minHeightNumberSmallest height the element may shrink to, taking priority over Height
minWidthNumberSmallest width the element may shrink to, taking priority over Width
mixBlendModeEnum (normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity)normalHow this element's colours blend with whatever is painted behind it
mountedBooleantrueRemoves the element from the page entirely when false, unlike Visible which leaves its space behind
mutedBooleanSilences the video without changing Volume, and is what lets Autoplay work
objectFitEnum (contain, cover, fill, none)containHow the video fills its box when the two have different proportions
objectPositionXNumber50Which part of the video stays visible horizontally when Object Fit crops it
objectPositionYNumber50Which part of the video stays visible vertically when Object Fit crops it
opacityNumber1How opaque this element is, from 0 for invisible to 1 for solid
pointerEventsEnabledBooleantrueWhen disabled, mouse and touch events pass through to whatever is behind this element
pointerEventsModeEnum (inherit, explicit)inheritWhether pointer handling is inherited from the parent or set explicitly on this element
positionEnum (relative, absolute, sticky, fixed)relativeHow the element is placed: In Layout follows its siblings, Absolute ignores them, Sticky pins to the parent edge on overflow, Fixed stays put and takes no space
posterImageStill image shown until the video has enough data to play; leave blank to show nothing
sizeModeEnum (explicit, contentWidth, contentHeight, contentSize)contentSizeWhether Width and Height are used as given, or the element sizes itself to fit its contents
srcStringURL or project file to play; leave blank to load nothing rather than fail on a missing source
srcObjectMediastreamnullA live MediaStream to play, from a camera or screen capture, instead of a URL
styleCssString/* background-color: red; */Raw CSS declarations applied to this element, overriding the styling ports above
transformOriginXNumber50Horizontal point the element rotates and scales around, as a fraction of its width
transformOriginYNumber50Vertical point the element rotates and scales around, as a fraction of its height
transformRotationNumber0Rotates the element clockwise in degrees, without affecting the layout
transformScaleNumber1Scales the element about its transform origin; 1 leaves it unscaled
transformXNumber0Moves the element right after layout, without moving its siblings
transformYNumber0Moves the element down after layout, without moving its siblings
variantStringName of a saved variant of this node type to apply, replacing the styling set here
visibleBooleantrueHides the element while keeping the space it occupies in the layout
volumeNumber1Playback volume from 0 to 1
widthDimension100Width of the element; how the value is read depends on Size Mode
zIndexNumberPaint order among overlapping siblings; higher numbers paint on top

Signals

NameTypeDefaultDescription
pauseSignalPauses playback
playSignalStarts or resumes playback; fired before the element exists, it is held until the element exists rather than dropped
resetSignalStops playback and seeks to the beginning
restartSignalSeeks to the beginning and plays, then fires Done

Outputs

Values

NameTypeDefaultDescription
boundingHeightNumberHeight this element actually ended up with after layout, in pixels
boundingWidthNumberWidth this element actually ended up with after layout, in pixels
childIndexNumberThis element's position among its parent's children, counting from 0
onTimeUpdateNumberHow far into the video playback has reached, in seconds
onVideoElementCreatedDomelementThe underlying video element, for a Group to scroll to or a script to reach
screenPositionXNumberDistance in pixels from the left edge of the window to this element's left edge
screenPositionYNumberDistance in pixels from the top edge of the window to this element's top edge
thisReferenceA reference to this node itself, for ports that take a node rather than a value
videoHeightNumberNatural height of the video in pixels, known once it has loaded
videoWidthNumberNatural width of the video in pixels, known once it has loaded

Signals

NameTypeDefaultDescription
completedSignalFires after every invocation, whatever the outcome — wire this to carry on regardless. Failure still fires and still carries its reason, so this cannot hide an error
didMountSignalFires once this element has been added to the page and can be measured
doneSignalFires once a Video Action has been carried out by the element
hoverEndSignalFires when the pointer leaves this element
hoverStartSignalFires when the pointer moves over this element or any of its children
onCanPlaySignalFires once enough of the video has loaded to start playing
onClickSignalFires when this element is clicked or tapped
onPauseSignalFires when playback pauses
onPlaySignalFires when playback starts or resumes
pointerDownSignalFires when a mouse button is pressed or a finger touches this element
pointerEnterSignalFires when the pointer moves onto this element, not counting its children
pointerUpSignalFires when the mouse button is released or the finger lifts over this element
willUnmountSignalFires just before this element is removed from the page, while it still exists

Failure outputs

NameTypeDefaultDescription
failureSignalFires when the action never reached the element, because it has still not mounted
onPlaybackFailureSignalFires when the video could not be loaded or played, after the reason has been reported on Error
playbackErrorStringWhy playback failed — either the browser refused to autoplay, or the source could not be decoded

Dynamic ports

This node's port list changes at runtime (declared-port-groups); the tables above may be incomplete for a given instance.

Declares conditional/expandable port groups whose visibility depends on parameter values (see declaredPortGroups).

ConditionInputs shownOutputs shown
sizeMode = explicit OR sizeMode = contentHeightwidth
sizeMode = explicit OR sizeMode = contentWidthheight
pointerEventsMode = explicitpointerEventsEnabled
borderStyle = solid OR borderStyle = dashed OR borderStyle = dottedborderWidth, borderColor
borderLeftStyle = solid OR borderLeftStyle = dashed OR borderLeftStyle = dotted OR borderStyle = solid OR borderStyle = dashed OR borderStyle = dottedborderLeftWidth, borderLeftColor
borderTopStyle = solid OR borderTopStyle = dashed OR borderTopStyle = dotted OR borderStyle = solid OR borderStyle = dashed OR borderStyle = dottedborderTopWidth, borderTopColor
borderRightStyle = solid OR borderRightStyle = dashed OR borderRightStyle = dotted OR borderStyle = solid OR borderStyle = dashed OR borderStyle = dottedborderRightWidth, borderRightColor
borderBottomStyle = solid OR borderBottomStyle = dashed OR borderBottomStyle = dotted OR borderStyle = solid OR borderStyle = dashed OR borderStyle = dottedborderBottomWidth, borderBottomColor

Ports at runtime

Declared-port-groups: width/height appear based on sizeMode, per-side border width/color ports appear once a border style is chosen, and pointerEventsEnabled appears when pointerEventsMode is 'explicit'. The playback and event ports are always present.

Patterns

  • Button onClickplay: user-initiated playback that satisfies browser autoplay policies.
  • Background hero: autoplay + muted + loop true, controls false, objectFit 'cover'.

Watch out for

  • Expecting autoplay alone to start sound-on playback — browsers refuse; either set muted or trigger play from a user gesture.

Examples

Wrapper component: Component Children marks the insertion point

Component Children is a placeholder with no ports: whatever children are given to an instance of the component are rendered where the placeholder sits. Here '/Media Frame' is a reusable framed panel — title bar on top, content slot below — and the consumer drops a Video inside its instance. The video's play/pause wiring lives at the consumer level; the frame knows nothing about its content.

Image, Group, Button

Generated

This page is generated from node-catalog-enriched.json. Do not edit it by hand — run npm run docs:nodes to regenerate, and fix the source enrichment instead.