[FIX] Remove unsupported video format from Android (#1166)
This commit is contained in:
parent
360451ea1e
commit
356a3e7098
|
@ -11,7 +11,6 @@ import { Video } from 'expo-av';
|
|||
import sharedStyles from '../views/Styles';
|
||||
import { COLOR_WHITE } from '../constants/colors';
|
||||
import { formatAttachmentUrl } from '../lib/utils';
|
||||
import log from '../utils/log';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
safeArea: {
|
||||
|
@ -85,7 +84,7 @@ const ModalContent = React.memo(({
|
|||
);
|
||||
}
|
||||
if (attachment && attachment.video_url) {
|
||||
const [loading, setLoading] = useState(0);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const uri = formatAttachmentUrl(attachment.video_url, user.id, user.token, baseUrl);
|
||||
return (
|
||||
<>
|
||||
|
@ -101,7 +100,7 @@ const ModalContent = React.memo(({
|
|||
useNativeControls
|
||||
onReadyForDisplay={() => setLoading(false)}
|
||||
onLoadStart={() => setLoading(true)}
|
||||
onError={log}
|
||||
onError={console.log}
|
||||
/>
|
||||
{ loading ? <ActivityIndicator size='large' style={styles.loading} /> : null }
|
||||
</>
|
||||
|
|
|
@ -10,7 +10,7 @@ import { isIOS } from '../../utils/deviceInfo';
|
|||
import { CustomIcon } from '../../lib/Icons';
|
||||
import { formatAttachmentUrl } from '../../lib/utils';
|
||||
|
||||
const SUPPORTED_TYPES = ['video/quicktime', 'video/mp4', ...(isIOS ? [] : ['video/webm', 'video/3gp', 'video/mkv'])];
|
||||
const SUPPORTED_TYPES = ['video/quicktime', 'video/mp4', ...(isIOS ? [] : ['video/3gp', 'video/mkv'])];
|
||||
const isTypeSupported = type => SUPPORTED_TYPES.indexOf(type) !== -1;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
Loading…
Reference in New Issue