Skip to content

docs(renderer): document closeBrowser() and fix the usage example - #28

Open
elwizard33 wants to merge 1 commit into
thecodacus:masterfrom
elwizard33:docs/renderer-close-browser
Open

elwizard33 wants to merge 1 commit into
thecodacus:masterfrom
elwizard33:docs/renderer-close-browser

Conversation

@elwizard33

Copy link
Copy Markdown

Fixes #21.

Adds a short "Closing the browser" section to docs/packages/renderer.md. It explains that the headless browser is shared between calls and that scripts need to call closeBrowser() when they're done, otherwise Node doesn't exit.

I also updated the usage example to match the current API. It now imports bundle from @rendiv/bundler rather than @rendiv/renderer, uses selectComposition() and composition instead of compositionId, and calls closeBrowser() in a finally. The options table says composition now as well.

One more thing I noticed but didn't change: the table says concurrency defaults to 4, but renderFrames defaults to 1. I wasn't sure which one is intended.

The shared headless browser stays open after a render, so a script using
the renderer API never exits unless it calls closeBrowser(). Say so, and
show it in the usage example.

The example also imported bundle from @rendiv/renderer (it lives in
@rendiv/bundler) and passed compositionId, which renderMedia does not
accept; use selectComposition() and the composition option instead.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 05a7a0c0-f1a5-4479-ad03-42b2008cde94
Commits

Reviewing files that changed from the base of the PR and between 6d6aca2 and f4f2e51.

Files selected for processing: 1
  • docs/packages/renderer.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node doesn't exit after renderMedia()/renderFrames() unless closeBrowser() is called

1 participant