Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Update collaboration sounds, add sounds to screensharing

Nate Butlera7ce602bac09
diff --git a/assets/sounds/joined.wav b/assets/sounds/joined.wav
deleted file mode 100644
index 70cd41d16f9..00000000000
Binary files a/assets/sounds/joined.wav and /dev/null differ
diff --git a/assets/sounds/joined_call.wav b/assets/sounds/joined_call.wav
new file mode 100644
index 00000000000..cf6e5ba4dfc
Binary files /dev/null and b/assets/sounds/joined_call.wav differ
diff --git a/assets/sounds/leave.wav b/assets/sounds/leave.wav
deleted file mode 100644
index 27dcea38f45..00000000000
Binary files a/assets/sounds/leave.wav and /dev/null differ
diff --git a/assets/sounds/leave_call.wav b/assets/sounds/leave_call.wav
new file mode 100644
index 00000000000..478b28204f2
Binary files /dev/null and b/assets/sounds/leave_call.wav differ
diff --git a/assets/sounds/mute.wav b/assets/sounds/mute.wav
index 79023bdf62a..69e8456f6c3 100644
Binary files a/assets/sounds/mute.wav and b/assets/sounds/mute.wav differ
diff --git a/assets/sounds/start_screenshare.wav b/assets/sounds/start_screenshare.wav
new file mode 100644
index 00000000000..7b72a90af16
Binary files /dev/null and b/assets/sounds/start_screenshare.wav differ
diff --git a/assets/sounds/stop_screenshare.wav b/assets/sounds/stop_screenshare.wav
new file mode 100644
index 00000000000..1fe13e21b42
Binary files /dev/null and b/assets/sounds/stop_screenshare.wav differ
diff --git a/assets/sounds/unmute.wav b/assets/sounds/unmute.wav
index d87decead02..f8c90f69167 100644
Binary files a/assets/sounds/unmute.wav and b/assets/sounds/unmute.wav differ
diff --git a/crates/audio/src/audio.rs b/crates/audio/src/audio.rs
index 0216bf47be1..233b0f62aa5 100644
--- a/crates/audio/src/audio.rs
+++ b/crates/audio/src/audio.rs
@@ -15,15 +15,19 @@ pub enum Sound {
Leave,
Mute,
Unmute,
+ StartScreenshare,
+ StopScreenshare,
}
impl Sound {
fn file(&self) -> &'static str {
match self {
- Self::Joined => "joined",
- Self::Leave => "leave",
+ Self::Joined => "joined_call",
+ Self::Leave => "leave_call",
Self::Mute => "mute",
Self::Unmute => "unmute",
+ Self::StartScreenshare => "start_screenshare",
+ Self::StopScreenshare => "stop_screenshare",
}
}
}
diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs
index eed73ba1b1d..87e6faf988d 100644
--- a/crates/call/src/room.rs
+++ b/crates/call/src/room.rs
@@ -1222,6 +1222,9 @@ impl Room {
};
cx.notify();
}
+
+ Audio::play_sound(Sound::StartScreenshare, cx);
+
Ok(())
}
Err(error) => {
@@ -1311,6 +1314,8 @@ impl Room {
} => {
live_kit.room.unpublish_track(track_publication);
cx.notify();
+
+ Audio::play_sound(Sound::StopScreenshare, cx);
Ok(())
}
}