Skip to content

Refactor: Rename peer connection variables#1722

Merged
fippo merged 2 commits intowebrtc:gh-pagesfrom
fippo:peerconnection-naming
Nov 17, 2025
Merged

Refactor: Rename peer connection variables#1722
fippo merged 2 commits intowebrtc:gh-pagesfrom
fippo:peerconnection-naming

Conversation

@fippo
Copy link
Collaborator

@fippo fippo commented Nov 16, 2025

Rename 'localPeerConnection' to 'pc1' and 'remotePeerConnection' to 'pc2' across the codebase. Additionally, rename 'localConnection' to 'pc1' and 'remoteConnection' to 'pc2', and remove explicit 'window.localConnection' and 'window.remoteConnection' assignments.

Prompt for gemini:

rename all instances of "localPeerConnection" found using `git grep localPeerConnection`
to `pc1` and all instances of `remotePeerConnection`  to `pc2`

(and then repeated for "localConnection")

Rename 'localPeerConnection' to 'pc1' and 'remotePeerConnection' to 'pc2' across the codebase.
Additionally, rename 'localConnection' to 'pc1' and 'remoteConnection' to 'pc2', and remove explicit 'window.localConnection' and 'window.remoteConnection' assignments.

This refactoring improves consistency and brevity in variable naming for peer connection objects.
@fippo fippo force-pushed the peerconnection-naming branch from 41a8ecb to ccd55f4 Compare November 16, 2025 08:33
@fippo fippo requested a review from alvestrand November 16, 2025 08:39
@fippo
Copy link
Collaborator Author

fippo commented Nov 16, 2025

(gotta spend todays free gemini tokens and this has annoyed me for years!)

Copy link
Contributor

@alvestrand alvestrand left a comment

Choose a reason for hiding this comment

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

Now if we had tests covering all of these, we might even feel confident that it still worked...

@fippo fippo merged commit 81bd60e into webrtc:gh-pages Nov 17, 2025
4 of 5 checks passed
@fippo fippo deleted the peerconnection-naming branch November 17, 2025 09:40
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