I have a feed which displays multiple videos in a <FlatList/>
. Each video is hosted offsite on a uri.
Each video in the feed is muted and paused and I am triggering the ones in viewport to play (usually no more than 3 at a time).
On iOS I started seeing the app crash with the error Message from debugger: Terminated due to memory issue
in Xcode. I see memory spike slightly (it goes from ~120MB to ~150MB, holds for a few seconds then the app crashes).
Because of this I tried keeping the videos all paused but the same thing happens.
When I switch out the <Video/>
for a <FastImage/>
preview the crash stops.
Example of a video component:
<Video
source={{ uri: props.uri }}
repeat={true}
muted={true}
volume={0.0}
paused={props.paused}
posterResizeMode="cover"
resizeMode="cover"
poster={props.thumbnail}
style={props.style}
ref={ref => {
this.player = ref;
}}
/>
Has anyone else experienced this error message/crash with react-native-video
?
Is there a way to get more info out of Xcode as to why this is happening?
Android seems to handle things for a little longer but also results in an eventual crash.
Some info:
- RN 0.59.10
- React 16.8.6
- react-native-video 5.1.0-alpha1 (this is so I can fix the pause video bug in earlier versions)