You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4f2e51
Browse filesBrowse the repository at this point in the historyBrowse files
docs(renderer): document closeBrowser() and fix the usage example
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.
// 4. Close the shared headless browser so the process can exit
37
+
awaitcloseBrowser();
38
+
}
30
39
```
31
40
41
+
## Closing the browser
42
+
43
+
`renderMedia`, `renderFrames`, `renderStill` and `getCompositions` share one headless Chromium instance, which stays open between calls so later renders start faster. The renderer does not close it for you: call `closeBrowser()` when you are done rendering, or the Node.js process will not exit.
44
+
32
45
## renderMedia
33
46
34
47
Render a composition to a video file.
35
48
36
49
| Option | Type | Default | Description |
37
50
|--------|------|---------|-------------|
38
51
|`serveUrl`|`string`| required | URL or path to the bundled output |
39
-
|`compositionId`|`string`| required |ID of the composition to render |
52
+
|`composition`|`CompositionInfo`| required |The composition to render, from `selectComposition()`|
0 commit comments