adrianhajdin / aora

Build your first mobile application
https://jsmastery.pro
1.41k stars 259 forks source link

Playing a video from the VideoCard component ListHeaderComponent disappears #15

Open brayanobisto opened 4 months ago

brayanobisto commented 4 months ago

When a video is played on the Home screen in the VideoCard component, the ListHeaderComponent disappears

https://github.com/adrianhajdin/aora/assets/96144228/a66f5dc8-909c-4a2d-8e99-71cf3c38a76d

usmanpkz commented 1 month ago

actually it does not disappear, it goes behind the video that is playing. I was having the same problem. I changed the video height in component to h-60 (same as the TouchableOpacity that follows in that ternary operator. that seems to fix the issue. Not sure why no other height settings work for the video element but the issue got fixed.

{play ? ( <Video source={{ uri: video }} className='h-60 w-full rounded-xl mt-3 ' useNativeControls shouldPlay resizeMode={ResizeMode.COVER} onPlaybackStatusUpdate={status=> status.didJustFinish == true && setPlay(false)} /> ) : ( <TouchableOpacity className='w-full h-60 rounded-xl mt-3 relative justify-center items-center' activeOpacity={0.7} onPress={() => setPlay(true)}

<Image source={{ uri: thumbnail }} className='h-full w-full rounded-xl mt-3' resizeMode='cover' /> <Image source={icons.play} className='w-12 h-12 absolute' resizeMode='contain' /> )}