diff --git a/packages/convert/app/components/AudioCodecDropWarning.tsx b/packages/convert/app/components/AudioCodecDropWarning.tsx new file mode 100644 index 0000000000..762a71a3c2 --- /dev/null +++ b/packages/convert/app/components/AudioCodecDropWarning.tsx @@ -0,0 +1,10 @@ +import React from 'react'; + +export const AudioCodecDropWarning: React.FC = () => { + return ( +
+ Your browser doesn't support encoding audio and the audio track cannot be + copied into the new container. +
+ ); +}; diff --git a/packages/convert/app/components/AudioCodecSelection.tsx b/packages/convert/app/components/AudioCodecSelection.tsx index fade9d9ff0..ddd07c8118 100644 --- a/packages/convert/app/components/AudioCodecSelection.tsx +++ b/packages/convert/app/components/AudioCodecSelection.tsx @@ -1,6 +1,7 @@ import {MediaParserAudioCodec} from '@remotion/media-parser'; import {AudioOperation} from '@remotion/webcodecs'; import React from 'react'; +import {AudioCodecDropWarning} from './AudioCodecDropWarning'; import {AudioOperationOption} from './AudioOperationOption'; import { Select, @@ -21,28 +22,37 @@ export const AudioCodecSelection: React.FC<{ throw new Error('No current audio codec, should not render this component'); } + const disabled = audioTrackOptions.length < 2; + return ( - + <> + + {disabled ? : null} + ); }; diff --git a/packages/convert/app/components/VideoCodecSelection.tsx b/packages/convert/app/components/VideoCodecSelection.tsx index dbf0b315d1..1675158535 100644 --- a/packages/convert/app/components/VideoCodecSelection.tsx +++ b/packages/convert/app/components/VideoCodecSelection.tsx @@ -18,7 +18,11 @@ export const VideoCodecSelection: React.FC<{ readonly currentVideoCodec: MediaParserVideoCodec | null; }> = ({videoOperations, index, setIndex, currentVideoCodec}) => { return ( - setIndex(Number(v))} + >