react-native-video是<Video>标签控件。
示例:
// Within your render function, assuming you have a file called// "background.mp4" in your project<Video source={"background"} style={styles.backgroundVideo} repeat={true} />// Later on in your styles..var styles = Stylesheet.create({ backgroundVideo: { resizeMode: 'cover', // stretch and contain also supported position: 'absolute', top: 0, left: 0, bottom: 0, right: 0, },});
评论