π₯ Make videos programmatically with React
start probe
Jonny Burgercfe3e34cde7f
diff --git a/packages/convert/app/components/get-supported-configs.tsx b/packages/convert/app/components/get-supported-configs.tsxindex 1ec561b898..c1707b8a11 100644--- a/packages/convert/app/components/get-supported-configs.tsx+++ b/packages/convert/app/components/get-supported-configs.tsx@@ -46,6 +46,9 @@ const shouldPrioritizeVideoCopyOverReencode = (routeAction: RouteAction) => {if (routeAction.type === 'generic-convert') {return true;}+ if (routeAction.type === 'generic-probe') {+ return true;+ }throw new Error('Unsupported route action' + (routeAction satisfies never));};diff --git a/packages/convert/app/components/guess-codec-from-source.ts b/packages/convert/app/components/guess-codec-from-source.tsindex fb5748ae05..b12ca7a083 100644--- a/packages/convert/app/components/guess-codec-from-source.ts+++ b/packages/convert/app/components/guess-codec-from-source.ts@@ -49,6 +49,9 @@ const shouldKeepSameContainerByDefault = (action: RouteAction) => {if (action.type === 'convert') {return false;}+ if (action.type === 'generic-probe') {+ return false;+ }throw new Error(`Unhandled action type: ${action satisfies never}`);};diff --git a/packages/convert/app/lib/default-ui.ts b/packages/convert/app/lib/default-ui.tsindex 1b28666a27..6d9eb5d4d7 100644--- a/packages/convert/app/lib/default-ui.ts+++ b/packages/convert/app/lib/default-ui.ts@@ -8,6 +8,9 @@ export const defaultRotateOrMirorState = (if (action.type === 'convert') {return null;}+ if (action.type === 'generic-probe') {+ return null;+ }if (action.type === 'generic-convert') {return null;@@ -38,6 +41,9 @@ export const isConvertEnabledByDefault = (action: RouteAction) => {if (action.type === 'convert') {return true;}+ if (action.type === 'generic-probe') {+ return true;+ }if (action.type === 'generic-convert') {return true;@@ -83,6 +89,13 @@ export const getOrderOfSections = (mirror: 2,};}+ if (action.type === 'generic-probe') {+ return {+ convert: 0,+ rotate: 1,+ mirror: 2,+ };+ }if (action.type === 'generic-convert') {return {convert: 0,diff --git a/packages/convert/app/seo.ts b/packages/convert/app/seo.tsindex b3ded5ecca..2131e79eef 100644--- a/packages/convert/app/seo.ts+++ b/packages/convert/app/seo.ts@@ -46,6 +46,9 @@ export type RouteAction =| {type: 'mirror-format';format: ParseMediaContainer | ConvertMediaContainer;+ }+ | {+ type: 'generic-probe';};export const getHeaderTitle = (routeAction: RouteAction) => {@@ -53,6 +56,10 @@ export const getHeaderTitle = (routeAction: RouteAction) => {return `Fast ${renderHumanReadableContainer(routeAction.input)} β ${renderHumanReadableContainer(routeAction.output)} conversion in the browser`;}+ if (routeAction.type === 'generic-probe') {+ return 'See video metadata in the browser';+ }+if (routeAction.type === 'generic-convert') {return 'Fast video conversion in the browser';}@@ -85,6 +92,10 @@ export const getPageTitle = (routeAction: RouteAction) => {return `Online ${renderHumanReadableContainer(routeAction.input)} to ${renderHumanReadableContainer(routeAction.output)} converter - Remotion Convert`;}+ if (routeAction.type === 'generic-probe') {+ return 'Online video Metadata Viewer - Remotion Convert';+ }+if (routeAction.type === 'generic-rotate') {return 'Online video Rotation - Remotion Convert';}@@ -113,6 +124,10 @@ export const getDescription = (routeAction: RouteAction) => {return `The fastest online ${renderHumanReadableContainer(routeAction.input)} to ${renderHumanReadableContainer(routeAction.output)} converter, powered by WebCodecs. No upload required, no watermarks, no limits.`;}+ if (routeAction.type === 'generic-probe') {+ return `The fastest online video metadata viewer. No upload required, no ads, no limits.`;+ }+if (routeAction.type === 'generic-rotate') {return `The fastest online video rotator, powered by WebCodecs. No upload required, no watermarks, no limits.`;}@@ -145,6 +160,10 @@ export const makeSlug = (routeAction: RouteAction) => {return '/convert';}+ if (routeAction.type === 'generic-probe') {+ return '/probe';+ }+if (routeAction.type === 'generic-rotate') {return '/rotate';}