跳过内容

开始

GitHub

您可以使用我们的AI辅助设置来安装插件。使用以下命令将Capgo技能添加到您的AI工具中:

终端窗口
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

然后使用以下提示:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-realtimekit` plugin in my project.

如果您更喜欢手动设置,请运行以下命令并按照以下平台特定的说明进行安装:

终端窗口
bun add @capgo/capacitor-realtimekit
bunx cap sync
import { CapacitorRealtimekit } from '@capgo/capacitor-realtimekit';

在使用其他方法之前,初始化 RealtimeKit 插件。

import { CapacitorRealtimekit } from '@capgo/capacitor-realtimekit';
await CapacitorRealtimekit.initialize();

使用内置 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在上游发生变化时,请重新同步

如果您正在使用 开始 计划仪表板和API操作时,请将其连接到 使用@capgo/capacitor-realtimekit 为在使用@capgo/capacitor-realtimekit中native能力的 API 介绍 为 API 介绍的实现细节 介绍 为介绍的实现细节 API 密钥 为 API 密钥的实现细节, 和 设备 为设备的实现细节。