import { ConvertBytes } from "@/Utils/Other/BytesToMBKB";

const VideoMessage = (props) => {
    const { value } = props
    return (
        <div className='rounded-2xl overflow-hidden bg-primary/10'>
            <div className='aspect-video h-max max-w-72'>
                <video width="320" height="240" controls>
                    <source src={value?.url} type="video/mp4" />
                    <source src={value?.url} type="video/ogg" />
                </video>
            </div>
            <div className='px-3 py-1 bg-gray/50 text-xs flex flex-col'>
                <span>{value?.name}</span>
                <span>{ConvertBytes(value?.size)}</span>
            </div>
        </div>
    );
}

export default VideoMessage;
