Skip to content

Fix AudioBridgeNewParticipantsEvent not triggering for single participant joins#197

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-audiobridge-event-issue
Draft

Fix AudioBridgeNewParticipantsEvent not triggering for single participant joins#197
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-audiobridge-event-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 17, 2026

AudioBridgeNewParticipantsEvent was never triggered when participants joined. Janus sends audiobridge: "event" with participant (singular) for single joins, but the code only checked for participants (plural).

Changes

  • janus_audio_bridge_plugin.dart:339 - Check for both participant and participants fields when detecting new participant events
  • audio_bridge_joined_event.dart:111-114 - Handle singular participant field in AudioBridgeNewParticipantsEvent.fromJson() by wrapping in array

Event Flow

// When YOU join → AudioBridgeJoinedEvent
{"audiobridge": "joined", "id": 5678, "participants": [...]}

// When OTHERS join (single) → AudioBridgeNewParticipantsEvent (now fixed)
{"audiobridge": "event", "participant": {"id": 9876, ...}}

// When OTHERS join (multiple) → AudioBridgeNewParticipantsEvent (already worked)
{"audiobridge": "event", "participants": [...]}
Original prompt

This section details on the original issue you should resolve

<issue_title>AudioBridgeNewParticipantsEvent vs AudioBridgeJoinedEvent</issue_title>
<issue_description>I am using Janus 1.3.1 and latest janus_client version. I am a bit confused about theese two events. I thought that AudioBridgeJoinedEvent should be triggered whenever i join the room and AudioBridgeNewParticipantsEvent should be triggered when any other participant join the room. But only AudioBridgeJoinedEvent is always triggered and AudioBridgeNewParticipantsEvent is never triggered.

Plugin data has the only difference. When i join the room, i have id set. When other participant joins room, id si null.</issue_description>

<agent_instructions>fix this </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@shivanshtalwar0 Maybe it was missed out need to investigate

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…field

Co-authored-by: shivanshtalwar0 <26632663+shivanshtalwar0@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix triggering of AudioBridgeNewParticipantsEvent Fix AudioBridgeNewParticipantsEvent not triggering for single participant joins Feb 17, 2026
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.

AudioBridgeNewParticipantsEvent vs AudioBridgeJoinedEvent

2 participants