Skip to content

Fix/compatibility fixes - #13

Draft
dangusev wants to merge 18 commits into
mainfrom
fix/compatibility-fixes
Draft

dangusev wants to merge 18 commits into
mainfrom
fix/compatibility-fixes

Conversation

@dangusev

Copy link
Copy Markdown
Collaborator

No description provided.

- Add LocalAudioTrackConfig::pcm_queue_capacity (default 60 s) and with_pcm_queue_capacity.
The queue grows as needed. An overflow still drops the oldest samples and returns PcmQueueOverflow.
- Add LocalAudioTrack::start_pacing and pause_pacing. write_pcm only fills the queue and does not start the pacer.
- Start pacing when the publisher PeerConnection is connected and pause it for all other states. Pause it on an ICE restart. Before this change, webrtc-rs dropped audio written before DTLS connected and during reconnects.
- Start pacing in gpt_realtime_bot from its OpenAI PeerConnection state.
- Enter the captured runtime when a RemoteTrack is dropped, so a drop on a thread without a runtime does not panic and still unsubscribes.
- Reset a dropped join() to Idle and finish a dropped leave(), so the next join() is accepted.
- Request 1280x720 when a video or screen-share subscription has no dimension.
- Decode Opus into a reused buffer, so a queued frame holds only its samples.
- Hold the audio track weakly in the pacer, so the pacer ends when the track is dropped.
- Send CallEvent::CallEnded once when the SFU or the coordinator (call.ended) ends the call, then leave the call.
A second audio transceiver failed the SFU negotiation
(ParticipantMediaTransportFailure), which forced a REJOIN and made
publish_audio return PARTICIPANT_NOT_FOUND. The new track now takes over
the sender that stop_publish kept and continues its RTP sequence numbers
and timestamps: the SFU drops a stream whose timestamps go back.
@dangusev

dangusev commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 972471f. Configure here.

Comment thread src/rtc/join/lifecycle.rs
lifecycle.set_state(CallingState::Idle, &self.core.client_events_tx);
}
self.core.lifecycle_changed.notify_waiters();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Dropped join leaves SFU connected

High Severity

JoinAttempt and LeftCall only bump generation and flip CallingState. They never take the installed connection or send SFU leave. A timed-out join after join_once stores the session, or a dropped leave still waiting on that lock, leaves PeerConnections and the SFU participant alive while the handle reports Idle or Left.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 972471f. Configure here.

}
}
previous
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Join rebuild loses participant order

Medium Severity

apply_join_call_state_if_current takes the IndexMap and reinserts from the join-response list, so first-seen order does not survive REJOIN. max_subscriptions then keeps a different set of tracks than the participants the call originally learned, which is the rule the new config documents.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 972471f. Configure here.

Comment thread src/rtc/join/subscriptions_runtime.rs Outdated
if enabled {
rule.track_types.push(TrackType::Video);
}
rule.video_dimension = DEFAULT_VIDEO_DIMENSION;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Video toggle clears chosen dimensions

Medium Severity

set_incoming_video_enabled writes video_dimension to DEFAULT_VIDEO_DIMENSION (1920×1080) on every rule, including role filters. Disabling then enabling incoming video discards a configured size such as 640×360 and resubscribes at full HD.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 972471f. Configure here.

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.

1 participant