settings_input_antenna

Media

LiveKit Media

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

LayerResponsibility
LiveKitMicrophone transport, remote audio, media participants
Rust WebSocketChat, room events, seats, gifts, music, moderation
LaravelBusiness data, wallet, social features, trusted token orchestration
RedisPresence, room state, Pub/Sub, cross-server events
Do not run the legacy Rust offer/answer/ICE signaling flow together with LiveKit.