You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Using the shorthand silentAudioTrack prop (without explicit assignment) may lead to ambiguity. Consider using silentAudioTrack={true} for clarity and ensure the audio prop behavior aligns.
Store the timeout ID and clear it in a cleanup callback so the toggle won't fire after the component unmounts or dependencies change. This prevents potential memory leaks and unwanted toggles. Wrap the logic in a ref or local variable and return a cleanup function from the effect.
Why: Clearing the setTimeout in a cleanup prevents memory leaks and unwanted toggles after unmount, improving component reliability.
Medium
Explicitly enable audio
Make the audio configuration explicit to avoid unintended silent tracks or stale defaults. For example, set audio={true} to enable audio and silentAudioTrack={false} to ensure the track isn't muted by default.
Why: Restoring silentAudioTrack={false} and adding audio={true} fixes unintended muting from the new shorthand prop, ensuring audio streams correctly.
Medium
General
Add aria-label for accessibility
Add an accessible label or title to the audio trigger so screen readers can convey its purpose. This improves usability for assistive technologies. Use aria-label or title with a clear description.
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.
User description
This reverts commit e3f2eb6.
PR Type
Enhancement
Description
Uncomment toggleAudio call for automatic audio enable
Remove explicit silentAudioTrack and audio disable props
Add audio enable/disable button to broadcast controls
Changes walkthrough 📝
broadcast.tsx
Enable audio toggling and UI control
apps/app/components/playground/broadcast.tsx
silentAudioTrack={false}
andaudio={false}
propsBroadcast.AudioEnabledTrigger
control button