import Button from '@components/Button' import { StyleConstants } from '@utils/styles/constants' import { ResizeMode, Video, VideoFullscreenUpdate } from 'expo-av' import React, { useCallback, useEffect, useRef, useState } from 'react' import { AppState, AppStateStatus, Pressable, View } from 'react-native' import { Blurhash } from 'react-native-blurhash' import attachmentAspectRatio from './aspectRatio' import AttachmentAltText from './AltText' import { Platform } from 'expo-modules-core' export interface Props { total: number index: number sensitiveShown: boolean video: Mastodon.AttachmentVideo | Mastodon.AttachmentGifv gifv?: boolean } const AttachmentVideo: React.FC = ({ total, index, sensitiveShown, video, gifv = false }) => { const videoPlayer = useRef