33 lines
992 B
JavaScript
33 lines
992 B
JavaScript
|
|
import React from 'react';
|
||
|
|
import { View, Dimensions } from 'react-native';
|
||
|
|
// FileSytem
|
||
|
|
import * as FileSystem from 'expo-file-system';
|
||
|
|
// Video
|
||
|
|
import { Video } from 'expo-av';
|
||
|
|
import VideoPlayer from 'expo-video-player';
|
||
|
|
|
||
|
|
class VideoScreen extends React.Component {
|
||
|
|
render() {
|
||
|
|
const { uuid } = this.props.route.params;
|
||
|
|
return (
|
||
|
|
<View>
|
||
|
|
<VideoPlayer
|
||
|
|
height={Dimensions.get('window').height - 100}
|
||
|
|
videoProps={{
|
||
|
|
shouldPlay: true,
|
||
|
|
resizeMode: Video.RESIZE_MODE_COVER,
|
||
|
|
source: {
|
||
|
|
uri: FileSystem.documentDirectory + uuid + '.mp4',
|
||
|
|
},
|
||
|
|
}}
|
||
|
|
showFullscreenButton={false}
|
||
|
|
sliderColor={'#ce3029'}
|
||
|
|
showControlsOnLoad={true}
|
||
|
|
/>
|
||
|
|
</View>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default VideoScreen;
|