fix: add mkv to supported videos

This commit is contained in:
Ibrahima G. Coulibaly
2025-04-26 18:25:52 +01:00
parent 76d615ec7c
commit c033cfc9a6
6 changed files with 13 additions and 15 deletions

View File

@@ -5,11 +5,12 @@ import 'rc-slider/assets/index.css';
import BaseFileInput from './BaseFileInput';
import { BaseFileInputProps, formatTime } from './file-input-utils';
interface VideoFileInputProps extends BaseFileInputProps {
interface VideoFileInputProps extends Omit<BaseFileInputProps, 'accept'> {
showTrimControls?: boolean;
onTrimChange?: (trimStart: number, trimEnd: number) => void;
trimStart?: number;
trimEnd?: number;
accept?: string[];
}
export default function ToolVideoInput({
@@ -17,6 +18,7 @@ export default function ToolVideoInput({
onTrimChange,
trimStart = 0,
trimEnd = 100,
accept = ['video/*', '.mkv'],
...props
}: VideoFileInputProps) {
const videoRef = useRef<HTMLVideoElement>(null);
@@ -38,7 +40,7 @@ export default function ToolVideoInput({
};
return (
<BaseFileInput {...props} type={'video'}>
<BaseFileInput {...props} type={'video'} accept={accept}>
{({ preview }) => (
<Box
sx={{