Skip to content

Getting remote audio subscription and route-loudest-only work together#2356

Open
kota-yata wants to merge 10 commits intojitsi:masterfrom
kota-yata:kota/remote-as
Open

Getting remote audio subscription and route-loudest-only work together#2356
kota-yata wants to merge 10 commits intojitsi:masterfrom
kota-yata:kota/remote-as

Conversation

@kota-yata
Copy link
Copy Markdown
Contributor

@kota-yata kota-yata commented Aug 20, 2025

This PR adds another map to the AudioSubscriptionManager for remote subscription. An AudioSubscriptionManager then updates it according to new subscription and source addition/removal

@kota-yata kota-yata marked this pull request as ready for review August 29, 2025 03:38
Copy link
Copy Markdown
Member

@bgrozev bgrozev left a comment

Choose a reason for hiding this comment

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

I don't see handling of the removeAudioSubscription message implemented. I also don't see cleanup when a relay disconnects -- removing its explicit subscriptions

override fun addAudioSubscription(message: AddAudioSubscriptionMessage): BridgeChannelMessage? {
val sourceName = message.sourceName
val ep = relay.conference.findSourceOwner(sourceName)
ep?.addAudioSubscription(message.bridgeId, message.sourceName)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we log in case no ep is found?

} else {
subscribedRemoteAudioSources[sourceName] = mutableSetOf(endpointId)
if (endpoint is RelayedEndpoint) {
// TODO: Notify relay of new explicit subscription
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a few of these TODOs remaining in this class

* A message sent from one bridge to another indicating that the bridge subscribes to the source
*/
class AddAudioSubscriptionMessage(
val bridgeId: String,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't need to include the bridgeId in the message, as relay connections are direct -- we always know the ID of the other side

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