Skip to content

Commit

Permalink
chore(example): stop recording on unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jun 18, 2024
1 parent a70a3bd commit 268e59a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
44 changes: 22 additions & 22 deletions package/example/AppExamplePaper/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ PODS:
- React-Mapbuffer (0.74.1):
- glog
- React-debug
- react-native-filament (1.0.0):
- react-native-filament (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -949,16 +949,16 @@ PODS:
- React-featureflags
- React-graphics
- React-ImageManager
- react-native-filament/camutils (= 1.0.0)
- react-native-filament/filamat (= 1.0.0)
- react-native-filament/filament (= 1.0.0)
- react-native-filament/gltfio_core (= 1.0.0)
- react-native-filament/image (= 1.0.0)
- react-native-filament/ktxreader (= 1.0.0)
- react-native-filament/math (= 1.0.0)
- react-native-filament/tsl (= 1.0.0)
- react-native-filament/uberz (= 1.0.0)
- react-native-filament/utils (= 1.0.0)
- react-native-filament/camutils (= 1.2.0)
- react-native-filament/filamat (= 1.2.0)
- react-native-filament/filament (= 1.2.0)
- react-native-filament/gltfio_core (= 1.2.0)
- react-native-filament/image (= 1.2.0)
- react-native-filament/ktxreader (= 1.2.0)
- react-native-filament/math (= 1.2.0)
- react-native-filament/tsl (= 1.2.0)
- react-native-filament/uberz (= 1.2.0)
- react-native-filament/utils (= 1.2.0)
- react-native-worklets-core
- React-NativeModulesApple
- React-RCTFabric
Expand All @@ -967,7 +967,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/camutils (1.0.0):
- react-native-filament/camutils (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -990,7 +990,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/filamat (1.0.0):
- react-native-filament/filamat (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1014,7 +1014,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/filament (1.0.0):
- react-native-filament/filament (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1038,7 +1038,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/gltfio_core (1.0.0):
- react-native-filament/gltfio_core (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1063,7 +1063,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/image (1.0.0):
- react-native-filament/image (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1086,7 +1086,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/ktxreader (1.0.0):
- react-native-filament/ktxreader (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1110,7 +1110,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/math (1.0.0):
- react-native-filament/math (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1132,7 +1132,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/tsl (1.0.0):
- react-native-filament/tsl (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1154,7 +1154,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/uberz (1.0.0):
- react-native-filament/uberz (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1179,7 +1179,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-filament/utils (1.0.0):
- react-native-filament/utils (1.2.0):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1777,7 +1777,7 @@ SPEC CHECKSUMS:
React-jsitracing: 233d1a798fe0ff33b8e630b8f00f62c4a8115fbc
React-logger: 7e7403a2b14c97f847d90763af76b84b152b6fce
React-Mapbuffer: 11029dcd47c5c9e057a4092ab9c2a8d10a496a33
react-native-filament: d68ec47a51203f86d7b500cd0083d15eece1ab87
react-native-filament: eaf9684e5b82f40689320cb95bfadbaf48959c97
react-native-safe-area-context: dcab599c527c2d7de2d76507a523d20a0b83823d
react-native-video: 9f29aee2feb9e42da24cb40b70d005d38a1a132f
react-native-worklets-core: f51430dd07bf5343d4918d28a4bb00fe8f98b982
Expand Down
7 changes: 7 additions & 0 deletions package/example/Shared/src/AnimationTransitionsRecording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ function Renderer() {
console.log('Camera configured')
}, [camera, recorder.height, recorder.width])

React.useEffect(() => {
return () => {
console.log('On unmount: stop recording')
onFinish()
}
}, [onFinish])

return (
<View style={styles.container}>
{videoUri == null ? (
Expand Down

0 comments on commit 268e59a

Please sign in to comment.