指南
Streamcall 的教程
使用 @capgo/capacitor-stream-call
使用 https://getstream.io/ SDK 来实现 Capacitor 的呼叫功能
安装
bun add @capgo/capacitor-stream-call
bunx cap sync
此插件暴露的内容
login- 登录到流媒体视频服务。logout- 从流媒体视频服务注销。call- 启动与另一个用户的通话。endCall- 结束当前通话。
示例用途
login
登录到流媒体视频服务。
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.login({
token: 'your-token',
userId: 'user-123',
name: 'John Doe',
apiKey: 'your-api-key'
});
logout
从流媒体视频服务注销。
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.logout();
call
启动与另一个用户的通话。
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.call({
userId: 'user-456',
type: 'video',
ring: true
});
endCall
结束当前通话。
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.endCall();
全局参考
- GitHub: https://github.com/Cap-go/capacitor-streamcall/
- 文档:/docs/plugins/streamcall/
继续使用@capgo/capacitor-stream-call
如果您正在使用 使用@capgo/capacitor-stream-call 来规划原生插件工作,连接它与 @capgo/capacitor-stream-call 了解@capgo/capacitor-stream-call的实现细节在@capgo/capacitor-stream-call, 入门 了解入门的实现细节在入门, Capgo 插件目录 为产品工作流程在 Capgo 插件目录中 Capacitor 插件由 Capgo 提供 为插件实现细节在 Capacitor 插件由 Capgo 提供, 添加或更新插件 为添加或更新插件的实现细节