Docs

API reference

Video

Place a portable video layer from the selected deck's assets folder.

presentation.tsx

<Video id="demo" x={8} y={24} w={84} h={52} src="assets/demo.mp4" poster="assets/demo-poster.webp" />

Props reference

Keep these values literal and serializable so Canvas, Inspector, validation, and export can process them reliably.

APIPropertyType / valuesRequiredDescription
Shared native-layer propsidstringYesStable, unique layer identifier. Required for every visible native layer.
xnumberYesLeft position as a percentage of the slide canvas.
ynumberYesTop position as a percentage of the slide canvas.
wnumberYesFrame width as a percentage of the slide canvas.
hnumberYesFrame height as a percentage of the slide canvas.
groupIdstring—Groups native children without adding a wrapper element.
groupNamestring—Human-readable name for a group in Workbench.
sharedIdstring—Matches the same layer type across adjacent Morph slides; unique within each slide.
rotationnumber—Clockwise rotation in degrees.
opacitynumber—Layer opacity from 0 to 1.
motionJSON string—Versioned declarative action sequence. Keep a complete static final frame.
interactionJSON string—Versioned click interaction for slide navigation or a link.
VideosrcstringYesLocal MP4/WebM path, direct URL, or supported YouTube URL.
posterstring—Image shown before playback or in static rendering.
fitcover | contain | fill | scale-down—How video content fits its frame.
controlsboolean—Shows playback controls; defaults to true.
loopboolean—Loops playback; defaults to true.
mutedboolean—Mutes and enables inline autoplay; defaults to true.
radiusnumber—Frame corner radius.

Required syntax

Use id, x, y, w, h, and a verified relative src. OpenSlideX portable video uses local MP4 assets.

Preview image

poster can point to a local image shown before playback. Keep the video and poster with the deck rather than linking to an opaque machine path.