MCPcopy Create free account
hub / github.com/bajrangCoder/setu / toggle_mute

Method toggle_mute

src/components/audio_player.rs:219–223  ·  view source on GitHub ↗
(&mut self, cx: &mut Context<Self>)

Source from the content-addressed store, hash-verified

217 self.muted = !self.muted;
218 self.apply_volume();
219 cx.notify();
220 }
221
222 pub fn volume_up(&mut self, cx: &mut Context<Self>) {
223 self.volume = (self.volume + VOLUME_STEP).min(1.0);
224 if self.muted && self.volume > 0.0 {
225 self.muted = false;
226 }

Callers 2

on_key_downMethod · 0.80
renderMethod · 0.80

Calls 1

apply_volumeMethod · 0.80

Tested by

no test coverage detected