Skip to content

🎥 Make videos programmatically with React

revise onError usage in docs/ssr.md

Danil Hendra S56aeb5fea848
diff --git a/packages/docs/docs/ssr.md b/packages/docs/docs/ssr.md
index 79b833bef0..e6c3e9a3bd 100644
--- a/packages/docs/docs/ssr.md
+++ b/packages/docs/docs/ssr.md
@@ -66,9 +66,12 @@ const start = async () => {
// actual rendering starts.
onStart: () => console.log('Rendering frames...'),
// Handle errors in your React code
- onError: (error) => {
- console.error(`Could not render frame ${error.frame} properly`);
- console.error(`${error.error.message}`);
+ onError: (info) => {
+ if (info.frame === null) {
+ console.error('Got error while initalizing video rendering', info.error)
+ } else {
+ console.error('Got error at frame ', info.frame, info.error)
+ }
},
onFrameUpdate: (f) => {
// Log a message whenever 10 frames have rendered.