Skip to content

Commit 03ec522

Browse files
authored
Docs for kiosk mode (#83)
* Docs for kiosk mode * moar * moar * moar
1 parent f0fff3c commit 03ec522

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

browsers/live-view.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@ To access the live view, visit the `browser_live_view_url` provided when you cre
1515
The `browser_live_view_url` supports additional query parameters to customize the live view:
1616
- `readOnly` (bool): when set to `true`, the view will be non-interactive.
1717

18+
## Kiosk mode
19+
20+
Kiosk mode provides a fullscreen live view experience without browser UI elements like the address bar and tabs. You can enable kiosk mode when creating a browser by setting the `kiosk_mode` parameter to `true`.
21+
22+
<CodeGroup>
23+
24+
```typescript Typescript/Javascript
25+
const kernelBrowser = await kernel.browsers.create({
26+
viewport: {
27+
width: 1920,
28+
height: 1080
29+
},
30+
kiosk_mode: true
31+
});
32+
```
33+
34+
```python Python
35+
kernel_browser = client.browsers.create(
36+
viewport={
37+
"width": 1920,
38+
"height": 1080
39+
},
40+
kiosk_mode=True
41+
)
42+
```
43+
44+
</CodeGroup>
45+
1846
## Browser persistence
1947

2048
`browser_live_view_url` becomes invalid once the browser is [deleted](/browsers/termination) manually or via timeout.

browsers/viewport.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ kernel_browser_auto = client.browsers.create(
5151

5252
</CodeGroup>
5353

54+
<Note>
55+
The `refresh_rate` parameter only applies to live view sessions and is ignored for [headless](/browsers/headless) browsers.
56+
</Note>
57+
5458
## Supported viewport configurations
5559

5660
Kernel supports specific viewport configurations. The server will reject unsupported combinations. When you provide width and height without specifying refresh_rate, it will be automatically determined if the dimensions match one of the supported resolutions exactly. The following resolutions are supported:
@@ -204,4 +208,4 @@ The server will reject any viewport configuration that doesn't exactly match one
204208
- Higher resolutions (like 2560x1440) may impact the performance and responsiveness of live view sessions
205209
- The viewport size affects how websites render, especially those with responsive designs
206210
- Screenshots taken from the browser will match the configured viewport dimensions
207-
- In [headless mode](/browsers/headless), the viewport configuration still applies for rendering and screenshots
211+
- In [headless mode](/browsers/headless), the viewport width and height still apply for rendering and screenshots, but the `refresh_rate` parameter is ignored

0 commit comments

Comments
 (0)