Skip to main content

Module player

Module player 

Source
Expand description

Messages between the site and an arena’s player.

The player runs in a frame on the CDN’s domain. The site loads its index.html, waits for PlayerMessage::Ready, sends SiteMessage::Init, and from then on drives playback while the player reports the turn it’s showing. Messages are JSON strings in postMessage, tagged by type. Unknown messages are ignored, so either side can be newer.

The site draws charts, highlight marks, stats and the result from the metrics file. The player draws only the stage.

Structs§

View
A camera viewers can pick.

Enums§

PlayerMessage
Player → site.
SiteMessage
Site → player.

Constants§

PROTOCOL
Bumped when a message changes shape.