import Button from '@components/Button' import { StyleConstants } from '@utils/styles/constants' import { Video } from 'expo-av' import { Surface } from 'gl-react-expo' import { Blurhash } from 'gl-react-blurhash' import React, { useCallback, useRef, useState } from 'react' import { Pressable, StyleSheet, View } from 'react-native' import attachmentAspectRatio from './aspectRatio' import analytics from '@components/analytics' export interface Props { total: number index: number sensitiveShown: boolean video: Mastodon.AttachmentVideo | Mastodon.AttachmentGifv } const AttachmentVideo: React.FC = ({ total, index, sensitiveShown, video }) => { const videoPlayer = useRef