()
| 233 | } |
| 234 | |
| 235 | async function stopRecording() { |
| 236 | console.log("Stopping recording.."); |
| 237 | if (!recording) { |
| 238 | return; |
| 239 | } |
| 240 | |
| 241 | setRecording(null); |
| 242 | await recording.stopAndUnloadAsync(); |
| 243 | await Audio.setAudioModeAsync({ |
| 244 | allowsRecordingIOS: false, |
| 245 | }); |
| 246 | |
| 247 | const uri = recording.getURI(); |
| 248 | console.log("Recording stopped and stored at", uri); |
| 249 | if (!uri) { |
| 250 | return; |
| 251 | } |
| 252 | setSoundURI(uri); |
| 253 | } |
| 254 | |
| 255 | const sendAudio = async () => { |
| 256 | if (!soundURI) { |
nothing calls this directly
no outgoing calls
no test coverage detected