Skip to content

Instantly share code, notes, and snippets.

@aditodkar
Last active January 30, 2019 10:13
Show Gist options
  • Save aditodkar/d9648faf941174ed193162bc044332f7 to your computer and use it in GitHub Desktop.
Save aditodkar/d9648faf941174ed193162bc044332f7 to your computer and use it in GitHub Desktop.
<View>
<Video source={{uri: video}}
ref={(ref) => {
this.player = ref
}} // Store reference
onBuffer={this.onBuffer} // Callback when remote video is buffering
onEnd={this.onEnd} // Callback when playback finishes
onError={this.videoError} // Callback when video cannot be loaded
style={styles.backgroundVideo} />
</View>
backgroundVideo: {
width: '100%',
height: 350,
top: 0,
left: 0,
bottom: 0,
right: 0,
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment