()
| 215 | }; |
| 216 | |
| 217 | async function startRecording() { |
| 218 | try { |
| 219 | await Audio.setAudioModeAsync({ |
| 220 | allowsRecordingIOS: true, |
| 221 | playsInSilentModeIOS: true, |
| 222 | }); |
| 223 | |
| 224 | console.log("Starting recording.."); |
| 225 | const { recording } = await Audio.Recording.createAsync( |
| 226 | Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY |
| 227 | ); |
| 228 | setRecording(recording); |
| 229 | console.log("Recording started"); |
| 230 | } catch (err) { |
| 231 | console.error("Failed to start recording", err); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | async function stopRecording() { |
| 236 | console.log("Stopping recording.."); |
nothing calls this directly
no outgoing calls
no test coverage detected