Skip to main content

io.display.video

Displays a video to the action user. One of url or buffer must be provided.

Usage

await io.display.image('A video', {
url: 'https://upload.wikimedia.org/wikipedia/commons/a/ad/The_Kid_scenes.ogv',
height: 'medium',
muted: true,
})
interval.com

Props

buffer

Buffer Optional

A Node.js Buffer of the video file. Pass this or "url" to specify the video. Maximum size is 50MB. Supported file formats are "mp4", "webm", "avi", and "ogg".

height

"thumbnail" | "small" | "medium" | "large" Optional

The height of the image to render within the action. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

loop

boolean Optional

Whether the video should loop. Defaults to "false".

muted

boolean Optional

Whether the video should be muted by default. Defaults to "false".

size

"thumbnail" | "small" | "medium" | "large" Optional

The size of the video to render within the action. Size sets the height and width and takes precedence over those props. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

url

string Optional

The url for the video. Pass this or "buffer" to specify the video.

width

"thumbnail" | "small" | "medium" | "large" Optional

The width of the image to render within the action. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

Returns

null

Did this section clearly explain what you wanted to learn?
On this page