Last active
December 23, 2017 13:01
-
-
Save eyalcohen4/32d0a4c75aa74d62211eaea499d21665 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// At the top of our file | |
import { MaterialIcons, Octicons } from '@expo/vector-icons'; | |
// In our App class | |
render() { | |
const { width } = Dimensions.get('window'); | |
return ( | |
<View style={styles.container}> | |
<View> | |
<Text style={{ textAlign: 'center' }}> React Native Video </Text> | |
<Video | |
source={{ uri: 'http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4' }} | |
shouldPlay={this.state.shouldPlay} | |
resizeMode="cover" | |
style={{ width, height: 300 }} | |
/> | |
<View style={styles.controlBar}> | |
<MaterialIcons | |
name={this.state.shouldPlay ? "pause" : "play-arrow"} | |
size={45} | |
color="white" | |
onPress={this.handlePlayAndPause} | |
/> | |
</View> | |
</View> | |
</View> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment