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

Method stop

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

Source from the content-addressed store, hash-verified

204 if let Some(ref backend) = self.backend
205 && let Ok(backend) = backend.lock()
206 {
207 backend.player.stop();
208 }
209
210 self.backend = None;
211 self.playback_state = PlaybackState::Stopped;
212 self.current_position = Duration::ZERO;
213 cx.notify();
214 }
215
216 pub fn toggle_mute(&mut self, cx: &mut Context<Self>) {
217 self.muted = !self.muted;
218 self.apply_volume();
219 cx.notify();
220 }

Callers 1

renderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected