io.display.video
Displays a video to the action user. One of url
or buffer
must be provided.
Usage
- TypeScript
- JavaScript
- Python
await io.display.video("A video", {
url: "https://upload.wikimedia.org/wikipedia/commons/a/ad/The_Kid_scenes.ogv",
size: "medium",
muted: true,
});
await io.display.video("A video", {
url: "https://upload.wikimedia.org/wikipedia/commons/a/ad/The_Kid_scenes.ogv",
size: "medium",
muted: true,
});
await io.display.video("A video",
url="https://upload.wikimedia.org/wikipedia/commons/a/ad/The_Kid_scenes.ogv",
size="medium",
muted=True,
)
interval.com
Props
- TypeScript
- JavaScript
- Python
buffer
Optional
Buffer
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".
loop
Optional
boolean
Whether the video should loop. Defaults to "false".
muted
Optional
boolean
Whether the video should be muted by default. Defaults to "false".
size
Optional
"thumbnail" | "small" | "medium" | "large"
The size of the video to render within the action. Size sets the maximum width and automatic height based on the source image. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).
url
Optional
string
The url for the video. Pass this or "buffer" to specify the video.
Returns
null
buffer
Optional
Buffer
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".
loop
Optional
boolean
Whether the video should loop. Defaults to "false".
muted
Optional
boolean
Whether the video should be muted by default. Defaults to "false".
size
Optional
"thumbnail" | "small" | "medium" | "large"
The size of the video to render within the action. Size sets the maximum width and automatic height based on the source image. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).
url
Optional
string
The url for the video. Pass this or "buffer" to specify the video.
Returns
null
bytes
Optional
bytes
Bytes of the video file. Pass this or "url" to specify the image. Maximum size is 50MB. Supported file formats are "mp4", "webm", "avi", and "ogg".
loop
Optional
bool
Whether the video should loop. Defaults to "false".
muted
Optional
bool
Whether the video should be muted by default. Defaults to "false".
size
Optional
Literal["thumbnail", "smail", "medium", "large"]
The size of the video to render within the action. Size sets the maximum width and automatic height based on the source video. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).
url
Optional
str
The url for the video. Pass this or `bytes` to specify the video.
Returns
None
Was this section useful?