🎥 Make videos programmatically with React
log src when getting error playing a video
Jonny Burger5f13517726cf
diff --git a/packages/core/src/video/VideoForDevelopment.tsx b/packages/core/src/video/VideoForDevelopment.tsxindex 99c390c256..ebfe027a05 100644--- a/packages/core/src/video/VideoForDevelopment.tsx+++ b/packages/core/src/video/VideoForDevelopment.tsx@@ -74,7 +74,7 @@ const VideoForDevelopmentRefForwardingFunction: React.ForwardRefRenderFunction<if (current?.error) {console.error('Error occurred in video', current?.error);throw new Error(- `The browser threw an error while playing the video: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help`+ `The browser threw an error while playing the video ${nativeProps.src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help`);} else {throw new Error('The browser threw an error');diff --git a/packages/core/src/video/VideoForRendering.tsx b/packages/core/src/video/VideoForRendering.tsxindex 50f3ae2d32..eced3c7e0a 100644--- a/packages/core/src/video/VideoForRendering.tsx+++ b/packages/core/src/video/VideoForRendering.tsx@@ -178,7 +178,7 @@ const VideoForRenderingForwardFunction: React.ForwardRefRenderFunction<if (current?.error) {console.error('Error occurred in video', current?.error);throw new Error(- `The browser threw an error while playing the video: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help`+ `The browser threw an error while playing the video ${props.src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help`);} else {throw new Error('The browser threw an error');