How can I ensure that videos and images are displayed properly in React Native, regardless of their orientation? Specifically, how can I make sure that landscape videos are displayed as portrait and that both images and videos are resized appropriately?
using react native video library for showing videos and fast image library for images
postImage: {
flex: 1,
width: undefined,
height: undefined,
borderRadius: 5,
resizeMode: "contain",
aspectRatio: 1,
},
postImages: {
flexDirection: "row",
flexWrap: "wrap",
},
postImageContainer: {
width: "100%",
aspectRatio: 1,
// padding: 3,
},
selectedImage: {
flex: 1,
},
videoContainer: {
flex: 1,
width: width,
// height: 400,
alignSelf: "center",
},
ImageBackground: {
flex: 1,
resizeMode: "cover",
width: "100%",
alignItems: "center",
},
I tried these styles