Skip to content

LivekitBridge -> SessionManager#75

Closed
stephen-derosa wants to merge 13 commits intolivekit:mainfrom
stephen-derosa:sderosa/session_manager
Closed

LivekitBridge -> SessionManager#75
stephen-derosa wants to merge 13 commits intolivekit:mainfrom
stephen-derosa:sderosa/session_manager

Conversation

@stephen-derosa
Copy link
Contributor

@stephen-derosa stephen-derosa commented Mar 10, 2026

Overview

LivekitBridge -> SessionManager

SessionManager::getRoom()

Building

SessionManager compiles with the base sdk as its own lib

Examples

All simply_* tests have been moved to examples/base_sdk to clearly distinguish between base sdk vs expected dev workflow.

added example to use the base sdk via SessionManager::getRoom()

NOTE

this includes the RpcController changes here

/// Audio/video tracks support mute, unmute, and release. Data tracks
/// only support release (they have no mute/unmute); a mute request on
/// a data track is treated as release, and unmute returns an error.
namespace track_control {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same questions to the nested namesapces, what is the general design for the whole sdk ?

In case we are going with a nested namespace approach, I'd love to hear the benefits or considerations there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

session_manager namespace was an oversight, that has been removed. In general i have tended to use namespaces for convenient grouping of variables. The design here was to put all RPC related constants in their own NS for organization purposes this way if we need to update the track control functionality it should be well confined and we know it wont conflict with other "built in" RPC calls

} // namespace test

/**
* Handle to a published local audio track.
*
* Created via LiveKitBridge::createAudioTrack(). The bridge retains a
* Created via SessionManager::createAudioTrack(). The manager retains a
* reference to every track it creates and will automatically release all
* tracks when disconnect() is called. To unpublish a track mid-session,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was one of my TODOs that if we should add a disconnect() function in the room.h.

The reason why I didn't do it was that the API does not exist in other SDKs like python, but I do see some benefits of a disconnect() function that auto release all published tracks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this sort of handling should be done by the SDK since the track is tied to the room. IOW if the room is disconnected, the track is no longer valid. Users can of course delete the tracks themselves without disconnecting the room, but the "auto-cleanup" should be done by us when possible


#include "lk_log.h"
#include "livekit/livekit.h"
#include "lk_log.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it need to include lk_log.h ? shouldn't it be included inside the livekit/livekit.h ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally intentding to design around users needing to compile against speedlog (in the case of custom user sinks). However, this may have been a bit of an overdesign. I updated lk_log.h to be a public header and included it in livekit.h.

@stephen-derosa stephen-derosa force-pushed the sderosa/session_manager branch from 8a60a99 to 89ffdc5 Compare March 11, 2026 16:29
@xianshijing-lk xianshijing-lk requested a review from 1egoman March 13, 2026 13:21
@stephen-derosa
Copy link
Contributor Author

closed in favor of #76. No longer need to rename to session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants