Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add joined sound effect when new participants join the room
Mikayla Maki0e4c90409145
diff --git a/crates/call/src/call.rs b/crates/call/src/call.rsindex 74ce7c2e75d..0a8f150194e 100644--- a/crates/call/src/call.rs+++ b/crates/call/src/call.rs@@ -10,19 +10,15 @@ use futures::{future::Shared, FutureExt};use postage::watch;use gpui::{- AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, Subscription,- Task, WeakModelHandle,+ AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, Subscription, Task,+ WeakModelHandle,};use project::Project;pub use participant::ParticipantLocation;pub use room::Room;-pub fn init(- client: Arc<Client>,- user_store: ModelHandle<UserStore>,- cx: &mut AppContext,-) {+pub fn init(client: Arc<Client>, user_store: ModelHandle<UserStore>, cx: &mut AppContext) {let active_call = cx.add_model(|cx| ActiveCall::new(client, user_store, cx));cx.set_global(active_call);}diff --git a/crates/call/src/room.rs b/crates/call/src/room.rsindex 10cfc862e91..eed73ba1b1d 100644--- a/crates/call/src/room.rs+++ b/crates/call/src/room.rs@@ -663,6 +663,8 @@ impl Room {},);+ Audio::play_sound(Sound::Joined, cx);+if let Some(live_kit) = this.live_kit.as_ref() {let video_tracks =live_kit.room.remote_video_tracks(&user.id.to_string());@@ -1363,7 +1365,10 @@ impl LiveKitRoom {let old_muted = *muted;*muted = should_mute;cx.notify();- Ok((cx.background().spawn(track_publication.set_mute(*muted)), old_muted))+ Ok((+ cx.background().spawn(track_publication.set_mute(*muted)),+ old_muted,+ ))}}?;