入门指南
复制一个包含安装步骤和该插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-realtimekit`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/realtimekit/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
安装
安装bun add @capgo/capacitor-realtimekitbunx cap sync导入
导入import { CapacitorRealtimekit } from '@capgo/capacitor-realtimekit';initialize
初始化 RealtimeKit 插件,用于使用其他方法。复制到剪贴板
import { CapacitorRealtimekit } from '@capgo/capacitor-realtimekit';
await CapacitorRealtimekit.initialize();startMeeting
使用内置 UI 开始会议。
仅在 Android 和 iOS 上可用。导入
import { CapacitorRealtimekit } from '@capgo/capacitor-realtimekit';
await CapacitorRealtimekit.startMeeting({ authToken: 'your-auth-token', enableAudio: true, enableVideo: true,});类型参考
类型参考StartMeetingOptions
开始会议选项开始会议的配置选项。
export interface StartMeetingOptions { /** * Authentication token for the participant. * This token is required to join the Cloudflare Calls meeting. * * @since 7.0.0 */ authToken: string;
/** * Whether to join with audio enabled. * Default is true. * * @default true * @since 7.0.0 */ enableAudio?: boolean;
/** * Whether to join with video enabled. * Default is true. * * @default true * @since 7.0.0 */ enableVideo?: boolean;}真实来源
真实来源本页面是由插件生成的。 src/definitions.ts当公共API上游更改时,请重新运行同步。