Skip to content

Instantly share code, notes, and snippets.

@gHashTag
Created May 26, 2017 16:08
Show Gist options
  • Select an option

  • Save gHashTag/c43c52a2f5e94fa43350d10ef9925ea9 to your computer and use it in GitHub Desktop.

Select an option

Save gHashTag/c43c52a2f5e94fa43350d10ef9925ea9 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native'
import Video from 'react-native-video'
export default class ShaktiMums extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!!
</Text>
<Video
source={{uri: 'https://youtu.be/9baaVjGdBqs'}}
// source={require('./ios/background.mp4')}
style={styles.video}
resizeMode='cover'
repeat={true}/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#282828',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
video: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
}
})
AppRegistry.registerComponent('ShaktiMums', () => ShaktiMums)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment