Skip to content
ExamplesOpen editor ↗

sekeriniSeSeTletseng

→ fullscreen()

Turns full-screen mode on or off, or says whether it is on.

sekeriniSeSeTletseng(on) | sekeriniSeSeTletseng()

sekeriniSeSeTletseng(nnete) grows the sketch to fill the whole screen; sekeriniSeSeTletseng(maaka) puts it back.

Browsers have a rule about it: it can only be called from something the reader did — a mouse press or a key. Calling it in setaLoeto does nothing.

🚫 In Bopa’s web editor it does not work — and it does not fail quietly: it throws. This was measured in the running editor rather than assumed: inside the sketch frame document.fullscreenEnabled is false, and sekeriniSeSeTletseng(nnete) throws Error: Fullscreen not enabled in this browser.

The cause is a safety choice, not a bug. Your sketch runs in a frame inside another frame, and browser permissions are handed down from the outside in — a frame cannot grant itself one it was not given. Bopa hands down exactly two, for the camera and the microphone. It does work in the Bopa desktop app, which has no nested frames.

If what you want is a sketch that fills the space available, see fensetereEFetogile — that is the route that works in Bopa.

⚠ Called with no argument it returns neither nnete nor maaka. You might expect a boolean; what it actually returns is the element that is full-screen, and lefela when none is. So fa (sekeriniSeSeTletseng() === maaka) is never true, even when the sketch is not full-screen.

NameTypeDescription
boleng (optional)nnetemaakannete to fill the screen, maaka to put it back.
Read the fullscreen state
tiro setaLoeto() {
  thalaKanefase(400, 200);
  rulaganyaMokwalo(BOGARE, BOGARE);
  bogoloJwaMokwalo(16);
  tlhalosa('sekeriniSeSeTletseng() === lefela');
}

tiro tshwantsha() {
  bokamorago(238);
  tlatsaMmala(40);
  metlha boemo = sekeriniSeSeTletseng() === lefela;
  thalaMokwalo('sekeriniSeSeTletseng() === lefela', 200, 70);
  thalaMokwalo(boemo ? 'nnete' : 'maaka', 200, 120);
}

fensetereEFetogile, bopharaFensetere, boleeleFensetere, konopoETshwerwe