Get streaming in under 5 minutes.
Sign up on the Synora portal and create an application to receive your API key and secret.
API Key: sf_xxxxxxxxxxxxxxxx
API Secret: xxxxxxxxxxxxxxxxxxxxxxxxxx
Call our REST API from your backend to generate a secure token:
POST https://synora.live/api/v1/token
Headers:
X-API-Key: your_api_key
X-API-Secret: your_api_secret
Content-Type: application/json
Body:
{
"room_name": "my_room",
"identity": "user_123",
"can_publish": true,
"can_subscribe": true
}
Response:
{
"token": "eyJhbGci...",
"server_url": "ws://your-server:7880",
"room_name": "app_1_my_room"
}
Use the livekit_client Flutter package:
// pubspec.yaml
dependencies:
livekit_client: ^2.7.0
// Dart code
final room = Room();
await room.connect(serverUrl, token);
await room.localParticipant?.setCameraEnabled(true);
await room.localParticipant?.setMicrophoneEnabled(true);
// Render local video
VideoTrackRenderer(
room.localParticipant!.videoTrackPublications
.first.track as VideoTrack,
)
// Render remote video
for (final participant in room.remoteParticipants.values)
VideoTrackRenderer(
participant.videoTrackPublications
.first.track as VideoTrack,
)