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.
| API | Property | Type / values | Required | Description |
|---|---|---|---|---|
| Shared native-layer props | id | string | Yes | Stable, unique layer identifier. Required for every visible native layer. |
| x | number | Yes | Left position as a percentage of the slide canvas. | |
| y | number | Yes | Top position as a percentage of the slide canvas. | |
| w | number | Yes | Frame width as a percentage of the slide canvas. | |
| h | number | Yes | Frame height as a percentage of the slide canvas. | |
| groupId | string | — | Groups native children without adding a wrapper element. | |
| groupName | string | — | Human-readable name for a group in Workbench. | |
| sharedId | string | — | Matches the same layer type across adjacent Morph slides; unique within each slide. | |
| rotation | number | — | Clockwise rotation in degrees. | |
| opacity | number | — | Layer opacity from 0 to 1. | |
| motion | JSON string | — | Versioned declarative action sequence. Keep a complete static final frame. | |
| interaction | JSON string | — | Versioned click interaction for slide navigation or a link. | |
| Video | src | string | Yes | Local MP4/WebM path, direct URL, or supported YouTube URL. |
| poster | string | — | Image shown before playback or in static rendering. | |
| fit | cover | contain | fill | scale-down | — | How video content fits its frame. | |
| controls | boolean | — | Shows playback controls; defaults to true. | |
| loop | boolean | — | Loops playback; defaults to true. | |
| muted | boolean | — | Mutes and enables inline autoplay; defaults to true. | |
| radius | number | — | 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.