Question · Vibe coding with Claude Code course · Module 13: Twitch clone

Quiz: how the player knows the chapter

How does VodPlayer know which chapter to highlight?

Answer options

  • A setInterval every 10 ms asks the server for the current chapter
  • The timeupdate event saves currentTime in state, and the chapter is computed during render by currentChapter
  • It saves the chapter in localStorage on every frame
  • The browser adds chapters to the <video> element by itself

You can check the correct answer by solving this task in the CodeWorlds game.