Commit 7870330
fix: Treat
fix(android): treat ERROR_SOURCE_INACTIVE as a successful finish
CameraX finalizes a valid file on ERROR_SOURCE_INACTIVE (the frames recorded
before the source went inactive — e.g. the Activity is stopped/destroyed
mid-recording), unlike ERROR_NO_VALID_DATA. Routing it to onRecordingError
discards usable footage, so map it to onRecordingFinished(STOPPED) instead,
matching expo-camera's handling. ERROR_NO_VALID_DATA stays fatal.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>ERROR_SOURCE_INACTIVE as a successful recording finish (don't discard a valid file) (#4042)1 parent 7e369fb commit 7870330
1 file changed
Lines changed: 3 additions & 0 deletions
File tree
- packages/react-native-vision-camera/android/src/main/java/com/margelo/nitro/camera/hybrids/recording
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
0 commit comments