parent
b78df990bf
commit
50a2817301
4 changed files with 1 additions and 32 deletions
@ -1,23 +0,0 @@ |
|||||||
import {StyleSheet} from 'react-native'; |
|
||||||
import Video from 'react-native-video'; |
|
||||||
import file from '../assets/video.mp4'; |
|
||||||
|
|
||||||
// Within your render function, assuming you have a file called
|
|
||||||
// "background.mp4" in your project. You can include multiple videos
|
|
||||||
// on a single screen if you like.
|
|
||||||
import React from 'react'; |
|
||||||
|
|
||||||
export default function CustomVideo() { |
|
||||||
return ( |
|
||||||
<Video |
|
||||||
source={file} // Can be a URL or a local file.
|
|
||||||
ref={ref => { |
|
||||||
this.player = ref; |
|
||||||
}} // Store reference
|
|
||||||
onBuffer={this.onBuffer} // Callback when remote video is buffering
|
|
||||||
onError={this.videoError} // Callback when video cannot be loaded
|
|
||||||
style={{width: '100%', height: '100%', borderRadius : 10}} |
|
||||||
controls |
|
||||||
/> |
|
||||||
); |
|
||||||
} |
|
Loading…
Reference in new issue