feat: Add dynamic server URL and deployment guide

This commit is contained in:
srtk 2026-02-08 17:52:14 +05:30
parent 84d79ab642
commit f93f2efd28

View file

@ -92,10 +92,16 @@ pub async fn handle_socket(mut socket: WebSocket, _addr: SocketAddr, state: AppS
Some(Ok(Message::Text(text))) => {
if let Ok(control) = serde_json::from_str::<ControlMsg>(&text) {
match control {
ControlMsg::UpdateStream { .. } => {
// Broadcast to room
ControlMsg::UpdateStream { stream_id, active, media_type, .. } => {
// Broadcast to room with sender's user_id
let update = ControlMsg::UpdateStream {
user_id: uid,
stream_id,
active,
media_type,
};
if let Some(room) = state.rooms.get(&rid) {
let _ = room.tx.send(control);
let _ = room.tx.send(update);
}
}
ControlMsg::ChatMessage { message, display_name, .. } => {