-
-
Notifications
You must be signed in to change notification settings - Fork 151
Feature/Host Video in canvas #473
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?
Feature/Host Video in canvas #473
Conversation
Initial cleanup and tweaks
revert --rm containers
|
@testradav nice dude!! this is awesome |
darioalessandro
left a comment
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.
@testradav amazing PR mate!! thank you for your contribution.
I found a couple of style changes related to the forked codebase that I do not think should be added here.
After that we can go ahead and ship this
Updated the GitHub link functionality and added a GitHub corner ribbon to the homepage.
yes, oops, I forgot I had cleaned up the landing page :) |
|
I am figuring out a bug where the host video stops showing (even though the camera is still on) whenever the canvas refreshes (eg. when someone else joins the meeting) |
The bug might be that the canvas changes names? videocall-client right now uses the unique canvas id to know which canvas to render to. |
|
I did another pass and I think I found what is causing render issues: SummaryGreat work implementing the host video in the canvas grid! The feature works well and improves the UX. However, there are some architectural and code quality issues that need addressing. What Works Well
Issues to Address1. Overly Complex Callback PatternProblem: The // Current approach in attendants.rs (lines 84, 584-587)
Msg::RegisterHostToggleName(Callback<MouseEvent>)
// Then stored in state and passed downSolution: Pass the callback directly through props instead of registering it via messages. Simpler data flow. 2. String Manipulation HackProblem: Manually appending " (You)" to identify the host (line 607): display_peers_vec.insert(0, my_email.clone() + " (You)");Solution: Create a proper struct like 3. Video Element ID InconsistencyThe PR changes the host video to use
4. Duplicate Conditional LogicIn fn render_video_element(is_host: bool, key: &str) -> Html {
if is_host {
html!{ <video class="self-camera" autoplay=true id={"webcam"} ...> }
} else {
html!{ <UserVideo id={key.clone()} hidden={false}/> }
}
}5. Code Quality Issues
6. Log StatementLine 144 in log::info!("YEW-UI: Rendering Peer Tile: {} {}", ...)RecommendationPlease refactor to address items 1-5 before merging. The feature works, but the architecture can be much cleaner. Happy to review again once updated! |
|
Thanks for the detailed and thorough review. I blame coding RUST with AI :) |
|
Hey @testradav I use AI too! Yes it does produce bad code sometimes, we should share rules to make our dev process better, so you use cursor or clause code? |
|
Hey @testradav can you put this behind a feature flag? some people like the facetime-whatsapp behavior. Making it a FF will make it optional (I do like this btw) |
issue #460