Skip to content

Game Replay

Overview

The Game Replay component plays back a won game round as the player played it, on the game's own board and at the pace of the original round. The viewer presses play to start the replay, and can watch it again once it ends.

Replays are available for won rounds of supported games. For any other round, the component shows a message instead of the replay.

Script URL

This web component is provided as a script and can be loaded from the CDN using the following URL pattern:

https://<cdn-url>/<bundle-version>/game-replay.js

Example:

https://cdn.example.com/v1.1.0/game-replay.js

Both <cdn-url> and <bundle-version> values will be provided to you.

If making use of the browser's Subresource Integrity feature, the integrity hash will also be provided.

Component Details

Once the script is loaded, the Game Replay component can be added to the page by using the element <gt-game-replay>.

Required Attributes

Attribute Type Description
roundId string The unique identifier of the game round to replay.

Optional Attributes

Attribute Type Description
locale string The locale code for content localization (e.g. en-US).
maxDurationMs number The longest the round's actions may take to play back, in milliseconds. A longer round is sped up in proportion to fit. For scheduled games (such as crash), this covers the whole replay, from pressing play to the result. Default: 30000.
settledDateUtc string The settlement date of the round in ISO 8601 UTC format (e.g. 2025-10-22T00:00:00.000Z).
theme string The visual theme to apply (e.g. dark, light). Falls back to the default theme if invalid.
token string The session token used for authentication.

Example

<gt-game-replay 
  roundId="1234-5678-9012"
  settledDateUtc="2025-10-22T00:00:00.000Z"
  token="auth-token-value"
></gt-game-replay>

Events

The following is a list of all available events supported by this component.

Details on how to listen for and dispatch events can be found here.

Outgoing Events

gtGameReplay.out.error

Replay error occurred. Not sent when a round simply has no replay (for example, a round that was not won); the component shows a message instead.

{
  code: string;
  message: string;
}

gtGameReplay.out.init

Replay loaded and ready to play.

{
  roundId: string;
}