(&mut self, cx: &mut Context<Self>)
| 128 | match self.playback_state { |
| 129 | PlaybackState::Stopped | PlaybackState::Error => self.play(cx), |
| 130 | PlaybackState::Playing => self.pause(cx), |
| 131 | PlaybackState::Paused => self.resume(cx), |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | fn play(&mut self, cx: &mut Context<Self>) { |
| 136 | self.error_message = None; |
| 137 | |
| 138 | if self.has_reached_end() { |
| 139 | self.current_position = Duration::ZERO; |
no test coverage detected