I am trying to find a way to play multiple videos, in array, at the same time. Here is an example:
If you have been on TikTok, you know usually those videos are playing at the same time. I am trying to accomplish something like that. Here is some of my code:
<FlatList
data={data.vidSlide}
horizontal={true}
renderItem={({ item }) => (
<Pressable onPress={() => navigation.navigate('Video', { Video: item })}>
<View key={item.id} style={{ flexDirection: 'row', paddingRight: 5 }}>
<Video
source={{ uri: item.video }}
ref={lo}
style={{ borderRadius: 7, width: 115, height: 175 }}
onPlaybackStatusUpdate={status => setStatus(() => status)}
onLoad={() => lo.current.playAsync()}
resizeMode="cover"
isLooping
>
</Video>
</View>
</Pressable>
)}
/>
This did not work. It showed all the videos, but only one video actually played. I have a feeling it has something to do with the "ref" though. How can I fix this?