mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-18 13:39:31 +02:00
fix: add mkv to supported videos
This commit is contained in:
11
.idea/workspace.xml
generated
11
.idea/workspace.xml
generated
@@ -4,10 +4,13 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="chore: readme img and fix broken link">
|
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="ci: on tag push, push docker images">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/components/Hero.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/Hero.tsx" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/components/input/ToolVideoInput.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/input/ToolVideoInput.tsx" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/pages/tools-by-category/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools-by-category/index.tsx" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/pages/tools/video/compress/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/video/compress/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/tools/video/loop/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/video/loop/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/tools/video/rotate/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/video/rotate/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/tools/video/trim/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/video/trim/index.tsx" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -412,6 +415,8 @@
|
|||||||
<workItem from="1743699386059" duration="11195000" />
|
<workItem from="1743699386059" duration="11195000" />
|
||||||
<workItem from="1743782726563" duration="2444000" />
|
<workItem from="1743782726563" duration="2444000" />
|
||||||
<workItem from="1743811558991" duration="1279000" />
|
<workItem from="1743811558991" duration="1279000" />
|
||||||
|
<workItem from="1745523972292" duration="3000" />
|
||||||
|
<workItem from="1745687713234" duration="591000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00144" summary="feat: stringify json">
|
<task id="LOCAL-00144" summary="feat: stringify json">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
|
@@ -5,11 +5,12 @@ import 'rc-slider/assets/index.css';
|
|||||||
import BaseFileInput from './BaseFileInput';
|
import BaseFileInput from './BaseFileInput';
|
||||||
import { BaseFileInputProps, formatTime } from './file-input-utils';
|
import { BaseFileInputProps, formatTime } from './file-input-utils';
|
||||||
|
|
||||||
interface VideoFileInputProps extends BaseFileInputProps {
|
interface VideoFileInputProps extends Omit<BaseFileInputProps, 'accept'> {
|
||||||
showTrimControls?: boolean;
|
showTrimControls?: boolean;
|
||||||
onTrimChange?: (trimStart: number, trimEnd: number) => void;
|
onTrimChange?: (trimStart: number, trimEnd: number) => void;
|
||||||
trimStart?: number;
|
trimStart?: number;
|
||||||
trimEnd?: number;
|
trimEnd?: number;
|
||||||
|
accept?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ToolVideoInput({
|
export default function ToolVideoInput({
|
||||||
@@ -17,6 +18,7 @@ export default function ToolVideoInput({
|
|||||||
onTrimChange,
|
onTrimChange,
|
||||||
trimStart = 0,
|
trimStart = 0,
|
||||||
trimEnd = 100,
|
trimEnd = 100,
|
||||||
|
accept = ['video/*', '.mkv'],
|
||||||
...props
|
...props
|
||||||
}: VideoFileInputProps) {
|
}: VideoFileInputProps) {
|
||||||
const videoRef = useRef<HTMLVideoElement>(null);
|
const videoRef = useRef<HTMLVideoElement>(null);
|
||||||
@@ -38,7 +40,7 @@ export default function ToolVideoInput({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseFileInput {...props} type={'video'}>
|
<BaseFileInput {...props} type={'video'} accept={accept}>
|
||||||
{({ preview }) => (
|
{({ preview }) => (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
@@ -160,7 +160,6 @@ export default function CompressVideo({ title }: ToolComponentProps) {
|
|||||||
<ToolVideoInput
|
<ToolVideoInput
|
||||||
value={input}
|
value={input}
|
||||||
onChange={setInput}
|
onChange={setInput}
|
||||||
accept={['video/mp4', 'video/webm', 'video/ogg']}
|
|
||||||
title={'Input Video'}
|
title={'Input Video'}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
@@ -61,13 +61,7 @@ export default function Loop({ title, longDescription }: ToolComponentProps) {
|
|||||||
<ToolContent
|
<ToolContent
|
||||||
title={title}
|
title={title}
|
||||||
input={input}
|
input={input}
|
||||||
inputComponent={
|
inputComponent={<ToolVideoInput value={input} onChange={setInput} />}
|
||||||
<ToolVideoInput
|
|
||||||
value={input}
|
|
||||||
onChange={setInput}
|
|
||||||
accept={['video/*']}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
resultComponent={
|
resultComponent={
|
||||||
loading ? (
|
loading ? (
|
||||||
<ToolFileResult
|
<ToolFileResult
|
||||||
|
@@ -81,7 +81,6 @@ export default function RotateVideo({ title }: ToolComponentProps) {
|
|||||||
<ToolVideoInput
|
<ToolVideoInput
|
||||||
value={input}
|
value={input}
|
||||||
onChange={setInput}
|
onChange={setInput}
|
||||||
accept={['video/mp4', 'video/webm', 'video/ogg']}
|
|
||||||
title={'Input Video'}
|
title={'Input Video'}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,6 @@ export default function TrimVideo({ title }: ToolComponentProps) {
|
|||||||
<ToolVideoInput
|
<ToolVideoInput
|
||||||
value={input}
|
value={input}
|
||||||
onChange={setInput}
|
onChange={setInput}
|
||||||
accept={['video/mp4', 'video/webm', 'video/ogg']}
|
|
||||||
title={'Input Video'}
|
title={'Input Video'}
|
||||||
showTrimControls={true}
|
showTrimControls={true}
|
||||||
onTrimChange={(trimStart, trimEnd) => {
|
onTrimChange={(trimStart, trimEnd) => {
|
||||||
|
Reference in New Issue
Block a user