-
Notifications
You must be signed in to change notification settings - Fork 432
Fix: unify WebRTC connection tracking for API + UI connections #404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
a1fe28d
4d94d52
0de40c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,9 +172,12 @@ def __init__( | |
| self.server_rtc_configuration = self.convert_to_aiortc_format( | ||
| server_rtc_configuration | ||
| ) | ||
| self.verbose = verbose | ||
| self._ui = self._generate_default_ui(ui_args) | ||
| self._ui.launch = self._wrap_gradio_launch(self._ui.launch) | ||
| def get_all_connections(self) -> List[str]: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This repo is using typing hints for Python 3.10+. It is enough (and preferred) to use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing docstring. See e.g., #405 |
||
| all_ids = list(self.connections.keys()) # type: ignore | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why type ignore? |
||
| if self.webrtc_component and hasattr(self.webrtc_component, "connections"): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is enough to check that |
||
| all_ids += list(self.webrtc_component.connections.keys()) # type: ignore | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why type ignore? |
||
| return all_ids | ||
|
|
||
|
|
||
| def mount( | ||
| self, app: FastAPI, path: str = "", tags: list[str | Enum] | None = None | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert changes:
self.verbose,self._uishouldn't change