import React from 'react'; import { StyleSheet, View } from 'react-native'; import Video from 'react-native-video'; import { SelectedAttachment } from '../../modals/SelectedAttachment'; interface StagedVideoDurationProbeProps { attachments: SelectedAttachment[]; /** Called once per video with its duration in whole seconds (0 if it couldn't be read). */ onDuration: (fileId: string, durationSeconds: number) => void; } /** * Off-screen probe that reads each staged VIDEO's duration ONCE (via react-native-video's `onLoad`) * and reports it back, so it can be stored on the model and written into the message metadata at * send time (the receiver's bubble then shows the duration chip without downloading the video). * * It mounts a hidden, muted, paused `