メインコンテンツにスキップ
プラグインに戻る
@capgo/capacitor-streamcall
チュートリアル
by github.com/Cap-go

ストリームコール

Integrate video calling and live streaming with Stream SDK for real-time communication

ガイド

__CAPGO_KEEP_1__のStreamcallに関するチュートリアル

capgo/capacitor-stream-callを使用する

__CAPGO_KEEP_0__を使用して https://getstream.io/ SDKを使用してCapacitorでコールを実装する

インストール

bun add @capgo/capacitor-stream-call
bunx cap sync

このプラグインが公開するもの

  • login - Stream Videoサービスにログインする
  • logout - Stream Videoサービスからログアウトする
  • 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();

フルリファレンス