Richtlinie
Tutorial zu Streamcall
Verwendung von @capgo/capacitor-stream-call
Verwendet das https://getstream.io/ SDK zum Implementieren von Anrufen in Capacitor.
Installieren
bun add @capgo/capacitor-stream-call
bunx cap sync
Was diese Erweiterung offenlegt
login- Anmeldung bei Stream Video-Dienst.logout- Abmeldung vom Stream Video-Dienst.call- Eine Anrufverbindung zu einem anderen Benutzer herstellen.endCall- Die aktuelle Anrufverbindung beenden.
Beispiel für die Verwendung
login
Anmelden zum Stream Video Dienst.
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.login({
token: 'your-token',
userId: 'user-123',
name: 'John Doe',
apiKey: 'your-api-key'
});
logout
Abmelden vom Stream Video Dienst.
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.logout();
call
- Eine Anrufverbindung zu einem anderen Benutzer herstellen.
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.call({
userId: 'user-456',
type: 'video',
ring: true
});
endCall
- Die aktuelle Anrufverbindung beenden.
import { StreamCall } from '@capgo/capacitor-stream-call';
await StreamCall.endCall();
Vollständige Referenz
- GitHub: https://github.com/Cap-go/capacitor-streamcall/
- Dokumentation: /docs/plugins/streamcall/