一种处理混合内容的网格布局:参与者、屏幕共享、插件和固定的参与者。自动在简单(simple)、聚光灯(spotlight)和高亮(highlighted)网格布局之间切换。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
meeting |
RealtimeKitClient |
✅ | - | RealtimeKit 会议实例 |
participants |
Peer[] |
✅ | [] |
活动参与者数组 |
pinnedParticipants |
Peer[] |
✅ | [] |
固定参与者数组 |
screenShareParticipants |
Peer[] |
✅ | [] |
正在共享屏幕的参与者数组 |
plugins |
RTKPlugin[] |
✅ | [] |
活动插件数组 |
aspectRatio |
string |
❌ | '16:9' |
网格瓷砖的宽高比 |
config |
UIConfig |
❌ | defaultConfig |
UI 配置对象 |
gap |
number |
❌ | 8 |
网格瓷砖之间的间距(以像素为单位) |
size |
'lg' | 'md' | 'sm' | 'xl' |
❌ | 'sm' |
尺寸变体 |
variant |
'boxed' | 'solid' |
❌ | 'solid' |
视觉样式变体 |
iconPack |
IconPack |
❌ | defaultIconPack |
自定义图标包 |
states |
States |
❌ | - | UI 状态对象 |
t |
RtkI18n |
❌ | - | i18n 翻译函数 |
import { RtkMixedGrid } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return (
<RtkMixedGrid
meeting={meeting}
participants={participants}
pinnedParticipants={[]}
screenShareParticipants={[]}
plugins={[]}
/>
);
}import { RtkMixedGrid } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return (
<RtkMixedGrid
meeting={meeting}
participants={participants}
pinnedParticipants={pinned}
screenShareParticipants={screenshares}
plugins={activePlugins}
aspectRatio="16:9"
gap={12}
size="md"
/>
);
}