March Docs

ScrollVideo

lib/scroll/video.march — Emit video blobs via the __SCROLL_BLOB__ sentinel protocol.

User code calls these helpers to embed video in the notebook:

ScrollVideo.mp4(b64_data)  -- embed an MP4 video
ScrollVideo.webm(b64_data) -- embed a WebM video
ScrollVideo.show(mime, b64)-- embed any video MIME type

The browser renders the blob as <video controls src="data:<mime>;base64,<b64>">.

Functions

fnmake_sentinelmake_sentinel(mime : String, b64 : String) : String#

Build the raw sentinel string for a video blob (for testing / composing).

fnmp4mp4(b64 : String) : () do show("video/mp4", b64) end#

Embed an MP4 video. b64 is the base64-encoded MP4 bytes.

fnshowshow(mime : String, b64 : String) : ()#

Embed video with the given MIME type in the notebook output.

b64 must be a valid base64-encoded representation of the video bytes. The browser renders the result as <video controls src="data:<mime>;base64,<b64>">.

Examples

march> ScrollVideo.show("video/mp4", "AAAAFG...")
()
fnwebmwebm(b64 : String) : () do show("video/webm", b64) end#

Embed a WebM video. b64 is the base64-encoded WebM bytes.