我希望我的视频能覆盖整个屏幕,但似乎只能覆盖一半的屏幕,如下所示
我对视频组件的样式设置如下:
<Video
source={{uri: this.state.video}}
style={{
position: 'absolute',
top: 0,
left: 0,
alignItems: 'stretch',
bottom: 0,
right: 0,
height: Dimensions.get('window').width,
}}
resizeMode="cover"
repeat={true}
/>
谁能告诉我如何实现这种行为,我在哪里出错? 任何帮助都会有用。
答案 0 :(得分:0)
不知何故,已经解决了以下提到的问题:
<Video
source={{uri: this.state.video}}
style={{
position: 'absolute',
top: 0,
left: 0,
alignItems: 'stretch',
bottom: 0,
right: 0,
height: "90%",
}}
resizeMode="cover"
repeat={true}
/>