mattermost-mobile/share_extension/components/video_file.tsx
Mattermost Build 0b21e31f01
Refactor Android Share extension (js) (#4893) (#4904)
* Refactor Android Share extension (js)

* Feedback review

(cherry picked from commit 043b3a0e8e)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-10-19 21:48:21 -03:00

45 lines
1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {StyleSheet, View} from 'react-native';
import Video from 'react-native-video';
interface VideoFileProps {
uri: string;
}
const VideoFile = ({uri}: VideoFileProps) => {
return (
<View style={styles.container}>
<Video
style={styles.video}
resizeMode='cover'
source={{uri}}
volume={0}
paused={false}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
height: 48,
marginRight: 10,
width: 48,
overflow: 'hidden',
},
video: {
borderBottomLeftRadius: 4,
borderTopLeftRadius: 4,
alignItems: 'center',
height: 46,
justifyContent: 'center',
overflow: 'hidden',
width: 48,
},
});
export default VideoFile;