mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
79 lines
2.3 KiB
JSON
79 lines
2.3 KiB
JSON
{
|
|
"templates": {
|
|
"video_item": {
|
|
"type": "container",
|
|
"width": {
|
|
"type": "match_parent",
|
|
"weight": 1
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "text",
|
|
"$text": "text",
|
|
"font_size": 20
|
|
},
|
|
{
|
|
"type": "video",
|
|
"height": {
|
|
"type": "fixed",
|
|
"value": 50
|
|
},
|
|
"video_sources": [
|
|
{
|
|
"type": "video_source",
|
|
"url": "https://yastatic.net/s3/home/divkit/bears.mp4",
|
|
"mime_type": "video/mp4"
|
|
}
|
|
],
|
|
"preload_required": true,
|
|
"repeatable": true,
|
|
"autostart": true,
|
|
"muted": true,
|
|
"background": [
|
|
{
|
|
"type": "solid",
|
|
"color": "#000000"
|
|
}
|
|
],
|
|
"aspect": {
|
|
"$ratio": "ratio"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"card": {
|
|
"log_id": "video",
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "grid",
|
|
"column_count": 2,
|
|
"items": [
|
|
{
|
|
"type": "video_item",
|
|
"text": "Default"
|
|
},
|
|
{
|
|
"type": "video_item",
|
|
"text": "1:1",
|
|
"ratio": 1
|
|
},
|
|
{
|
|
"type": "video_item",
|
|
"text": "2:1",
|
|
"ratio": 2
|
|
},
|
|
{
|
|
"type": "video_item",
|
|
"text": "1:2",
|
|
"ratio": 0.5
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|