Update README to reflect change with resizeMode

This commit is contained in:
Brent Vatne 2015-04-05 10:18:09 -07:00
parent 011ecff875
commit b100a9f882

View File

@ -27,12 +27,12 @@ A <Video> component for react-native, as seen in
// Within your render function, assuming you have a file called // Within your render function, assuming you have a file called
// "background.mp4" in your project. You can include multiple videos // "background.mp4" in your project. You can include multiple videos
// on a single screen if you like. // on a single screen if you like.
<Video source={"background"} style={styles.backgroundVideo} repeat={true} /> <Video source={"background"} style={styles.backgroundVideo}
resizeMode="cover" repeat={true} />
// Later on in your styles.. // Later on in your styles..
var styles = Stylesheet.create({ var styles = Stylesheet.create({
backgroundVideo: { backgroundVideo: {
resizeMode: 'cover', // stretch and contain also supported
position: 'absolute', position: 'absolute',
top: 0, top: 0,
left: 0, left: 0,