一种网格布局,在较大的视图中突出显示固定的参与者,并在较小的条状区域中显示其他参与者。处理未上台观众的直播播放器显示。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
meeting |
RealtimeKitClient |
✅ | - | RealtimeKit 会议实例 |
participants |
Peer[] |
✅ | - | 活动参与者数组 |
pinnedParticipants |
Peer[] |
✅ | - | 用于聚焦的已固定参与者数组 |
aspectRatio |
string |
❌ | '3:4' |
网格平铺的宽高比 |
config |
UIConfig |
❌ | defaultConfig |
UI 配置对象 |
gap |
number |
❌ | 4 |
网格平铺之间的间距(以像素为单位) |
iconPack |
IconPack |
❌ | defaultIconPack |
自定义图标包 |
size |
'lg' | 'md' | 'sm' | 'xl' |
❌ | 'sm' |
尺寸变体 |
states |
States |
❌ | - | UI 状态对象 |
t |
RtkI18n |
❌ | - | i18n 翻译函数 |
import { RtkSpotlightGrid } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return (
<RtkSpotlightGrid
meeting={meeting}
participants={participants}
pinnedParticipants={pinned}
/>
);
}import { RtkSpotlightGrid } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return (
<RtkSpotlightGrid
meeting={meeting}
participants={participants}
pinnedParticipants={pinned}
aspectRatio="16:9"
gap={8}
size="md"
/>
);
}