Question · Vibe coding with Claude Code course · Module 13: Twitch clone
Quiz: fullscreen state
Why does StreamPlayer set the fullscreen button label in the fullscreenchange event from document.fullscreenElement, instead of toggling state in onClick?
Answer options
- Because the fullscreenchange event arrives faster than the click
- Because useState does not work in components with a <video> element
- Because the browser can close fullscreen by itself, for example after Esc, and then a guessed state stops matching
- Because document.fullscreenElement returns the number of open fullscreens
You can check the correct answer by solving this task in the CodeWorlds game.