一个清晰的二维码,用于链接Wi-Fi、联系人、事件或应用商店,印在浅色纸上,模块深色且锐利,便于远距离扫描。它可以充满屏幕,居中显示,嵌入角落,作为一行显示在角落,或沿边缘拉伸成带状。你设置二维码内容,添加标题和下方小行文字,选择墨水和纸张颜色、模块和定位眼形状,添加小或大尺寸的标志或图标,并配有带框的行动号召。
直播卡片
类别:消息。标签:二维码,商店,餐厅与咖啡馆,大厅与接待。
布局
此核心卡适用于所有布局:全屏、居中、宽屏、角落、芯片、条带或任何自由矩形。
布局:全屏,居中,宽屏,角落,芯片,条带。表单:横向,纵向,方形,条带。
数据与隐私
此卡使用其配置的属性和实时卡数据。
属性
有关主题、背景、强调色和位置,请参见通用属性。
创建卡片时,在卡片的params中设置静态属性。其数据文档仅包含动态属性。嵌套行描述其父属性的内容。
静态属性
| 名称 | 类型 | 默认 | 数值和限制 | 描述 |
|---|---|---|---|---|
ecc | string | "M" | "L", "M", "Q", "H" | |
ink | string | "#111111" | 模式:"^#[0-9A-Fa-f]{6}$" | 模块颜色。在浅色纸张上保持深色。 |
paper | string | "#FFFFFF" | 模式:"^#[0-9A-Fa-f]{6}$" | 代码背后的卡片颜色。 |
style | object | additionalProperties:false | 模块和探测器形状;每个默认使用主题的。 | |
style.modules | string | "square", "rounded", "dots", "connected" | ||
style.eyes | string | "square", "rounded", "circle", "leaf" | ||
logo | 空值,字符串 | null | null, "activity-01", "air-vent", "airplane-01", "alert-01", "alert-02", "american-football", "analytics-up", "apple", "arrow-down-01", "arrow-down-right-01", "arrow-up-01", "arrow-up-right-01", "award-01", "baseball", "basketball-01", "battery-full", "bell-ring", "bicycle", "birthday-cake", "bitcoin", "bus-01", "calendar-03", "calendar-04", "calendar-add-01", "calendar-check", "call-02", "camera-01", "cancel-circle", "car-01", "champion", "chart-decrease", "chart-increase", "checkmark-circle-02", "clock-01", "clock-02", "cloud", "cloud-angled-rain", "cloud-angled-zap", "cloud-big-rain", "cloud-drizzle", "cloud-fog", "cloud-hailstone", "cloud-snow", "coffee-01", "coffee-02", "contact-01", "container-truck-01", "cricket-bat", "crown", "delivery-truck-01", "dices", "discord", "discount-tag-01", "dollar-02", "door-closed-locked", "door-open", "drink", "droplet", "ethereum", "euro", "exchange-01", "facebook-01", "factory", "fast-wind", "favourite", "ferry-boat", "fire", "fire-02", "first-aid-kit", "flag-01", "flag-02", "flash", "flower-01", "football", "gauge", "gift", "git-branch", "globe-02", "google", "hand-prayer", "heart", "help-circle", "home-01", "hourglass", "humidity", "ice-hockey", "information-circle", "instagram", "lamp-01", "lantern", "leaf-01", "leaf-02", "lightbulb", "link-01", "linkedin-01", "litecoin", "location-01", "location-04", "mail-01", "medal-first-place", "medical-mask", "meeting-room", "megaphone-01", "message-01", "money-exchange-02", "moon-02", "moon-cloud", "moon-star", "music-note-01", "navigation-03", "new-releases", "new-twitter", "news", "news-01", "noodles", "package-delivered", "parking-area-square", "party", "party-popper", "pause-circle", "percent-circle", "pinterest", "pizza-01", "play-circle", "play-store", "podium", "pound", "pumpkin", "qr-code", "qr-code-01", "queue-01", "quote-down", "quote-up", "ranking", "restaurant-01", "rocket-01", "rss", "running-shoes", "sale-tag-01", "security-check", "shop-sign", "shopping-bag-01", "siren", "smart-phone-01", "snapchat", "snowflake", "sparkles", "spotify", "star", "star-half", "star-off", "stop-circle", "store-01", "sun-03", "sun-cloud-02", "sunrise", "sunset", "swimming", "tag-01", "target-02", "temperature", "tennis-ball", "thermometer", "thermometer-cold", "thermometer-warm", "threads", "ticket-01", "tiktok", "time-quarter-pass", "timer-01", "tornado-02", "train-01", "tram", "trophy", "tropical-storm", "tsunami", "user-02", "user-group", "user-love-01", "vegetarian-food", "volleyball", "volume-high", "vote", "walking", "warehouse", "waves", "whatsapp", "wheat-off", "wifi-01", "wifi-full-signal", "wifi-lock", "wrench-01", "yen", "youtube" | 纸质敲击垫中央的图标;无则为 null。将 ECC 提升至 Q(大时为 H)。 |
logoScale | string | "small" | "small", "large" | |
frame | string | "none" | "none", "card", "ticket", "badge" | 承载行动号召的框架。 |
textless | boolean | false | 仅代码:在所有视图中无标题、详情、标签或行动号召。 | |
backgroundColor | 字符串,空值 | null | 模式:"^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$" | 用纯色 CSS 顺序覆盖卡片背景和底板。#RRGGBBAA 提供透明度。背景无则优先。 |
textColor | 字符串,空值 | null | 模式:"^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$" | 覆盖主文本和次要文本颜色。强调色和语义状态色保持原有功能。 |
动态属性
| 名称 | 类型 | 默认 | 数值和限制 | 描述 |
|---|---|---|---|---|
value | string | "" | maxLength:1024 | 原始负载。设置后优先于 action。 |
action | object | additionalProperties:false | 当 value 为空时构建有效负载。按类型字段:url {url, utm};phone {number};sms {number, message};email {to, subject, body};wifi {ssid, password, security, hidden};vcard {first, last, org, title, phone, email, url, address};event {title, start, end, location, description};geo {latitude, longitude, label};whatsapp {number, message};social {network, handle};review {placeId};app {ios, android};text {text}。 | |
action.type | string | "url"、"phone"、"sms"、"email"、"wifi"、"vcard"、"event"、"geo"、"whatsapp"、"social"、"review"、"app"、"text";必填 | ||
action.url | string | maxLength:1024 | ||
action.utm | object | additionalProperties:false | ||
action.utm.source | string | maxLength:100 | ||
action.utm.medium | string | maxLength:100 | ||
action.utm.campaign | string | maxLength:100 | ||
action.utm.content | string | maxLength:100 | ||
action.utm.term | string | maxLength:100 | ||
action.number | string | maxLength:40 | ||
action.message | string | maxLength:300 | ||
action.to | string | maxLength:200 | ||
action.subject | string | maxLength:200 | ||
action.body | string | maxLength:600 | ||
action.ssid | string | maxLength:64 | ||
action.password | string | maxLength:64 | ||
action.security | string | "WPA", "WEP", "nopass" | ||
action.hidden | boolean | |||
action.first | string | maxLength:80 | ||
action.last | string | maxLength:80 | ||
action.org | string | maxLength:120 | ||
action.title | string | maxLength:120 | ||
action.phone | string | maxLength:40 | ||
action.email | string | maxLength:200 | ||
action.address | string | maxLength:300 | ||
action.start | string | maxLength:40 | ||
action.end | string | maxLength:40 | ||
action.location | string | maxLength:200 | ||
action.description | string | maxLength:600 | ||
action.latitude | number | 最小值:-90;最大值:90 | ||
action.longitude | number | 最小值:-180;最大值:180 | ||
action.label | string | maxLength:120 | ||
action.network | string | "instagram", "facebook", "x", "linkedin", "tiktok", "youtube", "threads" | ||
action.handle | string | maxLength:80 | ||
action.placeId | string | maxLength:200 | ||
action.ios | string | maxLength:1024 | ||
action.android | string | maxLength:1024 | ||
action.text | string | maxLength:1024 | ||
caption | string | "" | maxLength:80 | |
detail | string | "" | maxLength:120 | 标题下方的小线条;为空时显示值为 URL。 |
cta | string | "" | maxLength:40 | 行动号召;无框架时显示“扫描我”。 |
画布示例
将静态属性保存为 params.json 并创建卡片。结果中包含它的 crd_ ID。
{
"theme": "neomustard"
}
screenrig card create --type qr-code --major 1 --file params.json
将此项目添加到播放列表页面的primitives中,并用该 ID 替换示例中的 ID。发布播放列表并分配屏幕。
{
"id": "qr-code",
"primitive": "card",
"card": "crd_01EXAMPLECARD000000000",
"layout": "full",
"content_fit": "fill"
}
写入实时数据
创建卡片后向其写入文档,之后替换该文档即可更新屏幕,无需重新发布。卡片会按其动态属性检查每次写入,并拒绝它不接受的文档。请使用与播放列表相同的项目。
将文档保存为card-data.json。CLI直接读取文档,无需包装:
{
"value": "",
"action": {
"type": "url"
},
"caption": "",
"detail": "",
"cta": ""
}
screenrig card data put crd_01EXAMPLECARD000000000 --file card-data.json
或直接调用 API。API 将相同文档包装在 document 字段中。智能体令牌已指定其项目,因此不发送项目头;若发送 ScreenRig-Project,必须与令牌项目匹配。通过环境提供 API 授权;详见 API 认证。
curl --request PUT "https://api.screenrig.ai/api/cards/crd_01EXAMPLECARD000000000/data" \
--header "Authorization: Bearer $SCREENRIG_TOKEN" \
--header "Content-Type: application/json" \
--data '{"document":{"value":"","action":{"type":"url"},"caption":"","detail":"","cta":""}}'