TLVideoAsset
An asset record representing video files that can be displayed in video shapes. Video assets store metadata about video files including dimensions, MIME type, animation status, and file source information. They are referenced by TLVideoShape instances to display video content on the canvas.
type TLVideoAsset = TLBaseAsset<
"video",
{
fileSize?: number;
h: number;
mimeType: null | string;
name: string;
src: null | string;
w: number;
isAnimated: boolean;
}
>;Example
import { TLVideoAsset } from "@tldraw/tlschema";
const videoAsset: TLVideoAsset = {
id: "asset:video123",
typeName: "asset",
type: "video",
props: {
w: 1920,
h: 1080,
name: "my-video.mp4",
isAnimated: true,
mimeType: "video/mp4",
src: "https://example.com/video.mp4",
fileSize: 5242880,
},
meta: {},
};Prev
TLUserIdNext
TLVideoShape