Skip to content

five-on-it / apps/client/src/ui/browser-players

apps/client/src/ui/browser-players ​

The players kept in one browser, one a tab: what lets several tabs of a browser play as several players on the same platform (the way Gmail's /u/1/ does), to try the game together by hand. Every tab is the browser's main player, unless its address names another (?as=p2, a name of a few lower-case letters and digits): the tab remembers it then (in its own session storage, so it stays that player on a reload, on another page of the game and back from Steam's sign-in) until its address names another, or as=main. Each player keeps everything the game keeps in the browser apart from the others: its session and guest's device (platform.ts), its settings and consent (settings.ts), its language (i18n.ts), its telemetry id (telemetry.ts), its Steam sign-in (steam.ts), its galleries' speeds; the main player under the keys as they always were (foi.session), another under its own (foi.as.p2.session). Nothing of it reaches the platform, which signs each in as it would a browser of its own. The desktop app is always its main player (Steam says who plays there). Every read and write of the browser's storage goes through pageStorage: ESLint refuses localStorage anywhere else in the client.

Interfaces ​

Type Aliases ​

Variables ​

Functions ​