Video¶
video is a block element node that represents an uploaded video or an embeddable video link. It is a void element.
Children¶
- Its
childrencontain one empty text node as a structural placeholder. The video source and display settings belong indata, rather than editable child text. See Void Elements.
Data Structure¶
Required Properties¶
data(required, object): video data.data.src(required, string): non-empty video source. Uploaded videos use an asset path or an absolute HTTP(S) URL. Whendata.is_embeddable_linkistrue, this is the provider's embeddable-player URL, rather than its ordinary watch-page URL.
Optional Properties¶
data.name(optional, string or null): video filename or display name. When absent,null, or empty, the editor usesdata.srcas the display name.data.size(optional, number or null): non-negative integer size in bytes. An absent field ornullmeans the size is unknown, rather than zero bytes.data.is_embeddable_link(optional, boolean):truerenderssrcin an embedded player;falserenders it as a video file. An absent field behaves asfalse.data.width(optional, number): positive, finite display width in CSS pixels (px), without a unit suffix in JSON. When omitted, the editor uses100%of the available container width.
Example¶
{
"id": "video-id",
"type": "video",
"data": {
"src": "/video.mp4",
"name": "video.mp4",
"size": 2357967,
"is_embeddable_link": false,
"width": 640
},
"children": [
{
"id": "video-placeholder-id",
"text": ""
}
]
}