SPLive uses LiveKit for voice media and the Rust WebSocket for room signaling, chat, moderation, and realtime state.
Connect media
dart
await sdk.connect(
SpliveSessionConfig(
serverUrl: mediaUrl,
accessToken: mediaToken,
roomId: rustRoomId,
userId: rustUserId,
displayName: displayName,
enableMicrophoneOnConnect: false,
),
);Connection state
dart
print(sdk.connectionState);
print(sdk.isConnected);
sdk.connectionStates.listen((state) {
print(state);
});Media controls
dart
await sdk.enableMicrophone();
await sdk.disableMicrophone();
await sdk.toggleMicrophone();
await sdk.setSpeakerOutput(true);Participants
dart
final current = sdk.currentParticipants();
sdk.participants.listen((participants) {
print(participants.length);
});Responsibilities
| Layer | Responsibility |
|---|---|
| LiveKit | Microphone transport, remote audio, media participants |
| Rust WebSocket | Chat, room events, seats, gifts, music, moderation |
| Laravel | Business data, wallet, social features, trusted token orchestration |
| Redis | Presence, room state, Pub/Sub, cross-server events |
Do not run the legacy Rust offer/answer/ICE signaling flow together with LiveKit.