-
-
Notifications
You must be signed in to change notification settings - Fork 184
fix: stabilize video streaming and media controls in 2v2 debates #424
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8d9231b
fixed continuous flash screen issue
priyanshunitr 735157c
added mic button
priyanshunitr 49e8f0f
2v2 video fix with optional TURN server setup
priyanshunitr f2a996f
WebRTC cleanup warnings
priyanshunitr ce8d95b
mic state fixed
priyanshunitr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: AOSSIE-Org/DebateAI
Length of output: 1862
🏁 Script executed:
Repository: AOSSIE-Org/DebateAI
Length of output: 2445
🌐 Web query:
Vite 5.4 import.meta.env VITE_ variables exposed to client source bundled documentation💡 Result:
In Vite 5.4, environment variables are exposed to client-side source code through the special import.meta.env object [1][2]. Key mechanics for this exposure include: 1. VITE_ Prefix Requirement: By default, Vite only exposes environment variables prefixed with VITE_ to your client-side source code [1][3]. This design is intended to prevent the accidental leakage of sensitive environment variables (such as API keys or database passwords) into the client bundle [1][4]. Any variables without this prefix remain inaccessible via import.meta.env [3][4]. 2. Static Replacement: During the build process, Vite statically replaces references to import.meta.env.VITE_SOME_VAR with the actual string value defined in your environment files [1][3]. Because these values are inlined into your JavaScript bundle at build time, they are visible to anyone inspecting the client-side code [3][5]. Consequently, you should never store sensitive secrets (like private keys) in VITE_ prefixed variables [4][5]. 3. Development vs. Production: Vite loads environment variables from.env files based on the current mode (e.g.,.env.production for the build command or.env.development for the dev server) [1][6]. 4. TypeScript Support: To receive IntelliSense for your custom VITE_ variables, you can augment the ImportMetaEnv interface within a type declaration file (e.g., src/vite-env.d.ts) [1][2]: /// interface ImportMetaEnv { readonly VITE_YOUR_VARIABLE: string // Add other variables here } interface ImportMeta { readonly env: ImportMetaEnv } If you need to access environment variables within your vite.config.ts file, you cannot use import.meta.env, as the configuration file is evaluated in a Node.js environment before these files are loaded [3]. Instead, you should use the loadEnv helper function exported by Vite [7][3].
Citations:
Issue short-lived TURN credentials from the backend
When production sets these
VITE_variables, Vite inlines them into browser assets, andTeamDebateRoom.tsxpasses them toRTCIceServer. Users can extract reusable credentials and abuse the relay. Issue short-lived, authenticated credentials per session from the backend. (vite.dev)🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 14-14: [UnorderedKey] The VITE_WEBRTC_TURN_CREDENTIAL key should go before the VITE_WEBRTC_TURN_URL key
(UnorderedKey)
🤖 Prompt for AI Agents