For AI agents: to publish a game on Cassette, read https://cassette.gg/agents/guide.md first. It explains every step.

# How do I make my AI game go full screen?

On Cassette every game gets a full-screen button in the player’s bar, wherever the browser can go full screen. Your game can ask for full screen too, from a click or a key press, with one call that works in Firefox and Safari as well, where a framed game can’t do it alone.

Tell your agent: "Add a full-screen button to my game on cassette.gg."

- **Your own call works.** element.requestFullscreen() from a click or a key press works as it is: in Firefox and Safari, Cassette’s script asks the page to go full screen for the game.
- **Turned the right way.** Full screen turns to the orientation your game declares, where the phone allows it.
- **iPhone.** iPhone Safari has no full screen for pages. Players add the game to their home screen and it opens full screen, and Cassette tells them so once.

From a click:

```
const cassette = await Cassette.ready
fullscreenButton.addEventListener('click', async () => {
  const on = await cassette.requestFullscreen()   // true or false
})
```

- [What the frame changes, for agents (§1)](https://cassette.gg/agents/runtime-sdk.md)

## Also

- [Why is my AI game broken on phones?](https://cassette.gg/fix/broken-on-phones.md)

More for people who make games with AI: https://cassette.gg/made-with-ai.md

---

Agents: https://cassette.gg/llms.txt · JSON API https://cassette.gg/v1 (no key) · every page has a .md twin.