parent
333d31e343
commit
f72eacfa95
11 changed files with 63 additions and 12902 deletions
File diff suppressed because it is too large
Load Diff
@ -1,23 +1,23 @@ |
|||||||
import {StyleSheet} from 'react-native'; |
// import {StyleSheet} from 'react-native';
|
||||||
import Video from 'react-native-video'; |
// import Video from 'react-native-video';
|
||||||
import file from '../assets/video.mp4'; |
// import file from '../assets/video.mp4';
|
||||||
|
|
||||||
// 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.
|
||||||
import React from 'react'; |
// import React from 'react';
|
||||||
|
|
||||||
export default function CustomVideo() { |
// export default function CustomVideo() {
|
||||||
return ( |
// return (
|
||||||
<Video |
// <Video
|
||||||
source={file} // Can be a URL or a local file.
|
// source={file} // Can be a URL or a local file.
|
||||||
ref={ref => { |
// ref={ref => {
|
||||||
this.player = ref; |
// this.player = ref;
|
||||||
}} // Store reference
|
// }} // Store reference
|
||||||
onBuffer={this.onBuffer} // Callback when remote video is buffering
|
// onBuffer={this.onBuffer} // Callback when remote video is buffering
|
||||||
onError={this.videoError} // Callback when video cannot be loaded
|
// onError={this.videoError} // Callback when video cannot be loaded
|
||||||
style={{width: '100%', height: '100%', borderRadius : 10}} |
// style={{width: '100%', height: '100%', borderRadius : 10}}
|
||||||
controls |
// controls
|
||||||
/> |
// />
|
||||||
); |
// );
|
||||||
} |
// }
|
||||||
|
Loading…
Reference in new issue