2022-10-07 16:41:43 +02:00
|
|
|
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}
|
2022-10-10 16:52:03 +02:00
|
|
|
sliderColor={'#ea4f52'}
|
2022-10-07 16:41:43 +02:00
|
|
|
showControlsOnLoad={true}
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default VideoScreen;
|