Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions browsers/viewport.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ await kernel.browsers.update(kernel_browser.session_id, viewport={"width": 1024,

<Warning>
There are important limitations when changing the viewport:
- **Headful browsers**: You can't resize the viewport while [live view](/browsers/live-view) is active or while a [replay](/browsers/replays) is actively recording unless you set the `force` flag to `true`.
- **Headful browsers**: You can't resize the viewport while [live view](/browsers/live-view) is active or while a [replay](/browsers/replays) recording is active unless you set the `force` flag to `true`.
- **Headless browsers**: Changing the viewport triggers a Chromium restart, which takes several seconds and may disrupt active CDP connections.
</Warning>

### Force resizing during recording
### Force resizing during replay playback

If you need to resize the viewport while a replay is actively recording, set `force` to `true` in the update request. This stops the current recording, resizes the viewport, and restarts the recording — resulting in multiple replay segments for the session.
If you need to resize the viewport while replay playback is active, set `force` to `true` in the update request. Kernel stops the active recording or replay process, applies the new viewport, and then restarts it. This creates multiple replay segments for the same browser session.

<CodeGroup>
```typescript Typescript/Javascript
Expand Down