> ## Documentation Index
> Fetch the complete documentation index at: https://ej3mplo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Host and window

> ejg.ui, ejg.sound, ejg.window, ejg.storage and the host events.

```js theme={null}
ejg.ui.open("settings" | "game" | "profiles" | "search" | "add-folder" | "stats" | "theme" | "collections" | "menu" | "explore" | "downloads", args)
ejg.ui.toast("Done", "ok")
ejg.sound.play("move" | "select" | "back" | "launch" | "error" | "open")
ejg.window.minimize(); ejg.window.maximize(); ejg.window.close(); ejg.window.fullscreen()
ejg.stats.get(30)        // the profile's statistics
ejg.storage.set("key", value); await ejg.storage.get("key")   // 512 KB per theme and profile
ejg.profile              // { id, name, avatar, color }
ejg.mode                 // "desktop" | "tv"
ejg.on("focus-return", () => …)   // a host overlay closed: take the focus back
ejg.on("visibility", ({ visible }) => …)   // pause videos if it is not visible
```

Dragging the window: put `data-ejg-drag` on your top bar (and `data-ejg-nodrag`
on the buttons inside it). Double-click maximizes.

Full types: `/_sdk/ejg.d.ts`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.