GameShare beta
Class of @v12-engine/client
export declare class GameShareSharing a game played in the page for others to watch (shareGame), for as long as the game lasts: started and stopped from its panel (sharePanel), which only shows it, so that a cinematic hiding the HUD does not stop it. Once shared, the next game under the same key is shared at once too, until it is stopped: a campaign watched from mission to mission
Members
constructor
constructor(options: {
world: World;
player: PlayerId;
key: string;
name: string;
storage?: KeptStorage;
});Constructs a new instance of the GameShare class
dispose
dispose(): void;The game is over: watchers are told, and they wait for the next one
name
get name(): string;What the game is called, for who watches
note
readonly note: Accessor<string>;What it is doing, or what went wrong: "Connecting…", "Another page shares it already". Empty when there is nothing to say
relay
get relay(): string;Where it is shared through: the relay's address
start
start(): Promise<void>;Shares the game, and the ones after it under the same key
stop
stop(): void;Stops sharing, and the games after it are not shared either
watchers
readonly watchers: Accessor<number | undefined>;How many watch it, while it is shared: nothing while it is not