# Platform Parameters

At any time, you can retrieve values for specific parameters that you might use in your game, such as the user's browser language.

#### Platform ID <a href="#platform-id" id="platform-id"></a>

Identify the platform on which the game is currently running to customize features and settings accordingly.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F6AzQ07IHfokBmNJSmbXz%2FScreenshot%202025-07-11%20at%204.38.17%E2%80%AFPM.png?alt=media&#x26;token=3535665c-b130-4089-bab1-412ceed1d800" alt=""><figcaption></figcaption></figure>

Returns the ID of the platform on which the game is currently running. Possible values: `playgama`, `vk`, `ok`, `yandex`, `facebook`, `crazy_games`, `game_distribution`, `playdeck`, `telegram`, `y8`, `lagged`, `msn`, `microsoft_store`, `poki`, `qa_tool`, `discord`, `gamepush`, `bitquest`, `huawei`, `jio_games`, `reddit`, `youtube`, `mock`, `xiaomi`.

#### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Language <a href="#language" id="language"></a>

{% hint style="warning" %}
Check the language to display proper text labels.&#x20;
{% endhint %}

Get the language set by the user on the platform or the browser language if not provided by the platform, to localize game content.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FljxWpvp5lfMc2rakqVoN%2FScreenshot%202025-07-11%20at%204.39.05%E2%80%AFPM.png?alt=media&#x26;token=898ed61e-9214-4af7-995a-73590fc5abde" alt=""><figcaption></figcaption></figure>

If the platform provides user language data, this will be the language set by the user on the platform. If not, it will be the browser language.

Format: ISO 639-1. Example: `ru`, `en`.

#### URL Parameter <a href="#url-parameter" id="url-parameter"></a>

Embed auxiliary information into the game URL to pass additional data or settings when launching the game.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FtFR3cMkeVTspCjLUDYnu%2FScreenshot%202025-07-11%20at%204.39.46%E2%80%AFPM.png?alt=media&#x26;token=c090d78f-baec-4c80-a699-89d02fdbefc6" alt=""><figcaption></figcaption></figure>

This parameter allows embedding auxiliary information into the game URL.

| Platform    | URL Format                                                           |
| ----------- | -------------------------------------------------------------------- |
| VK          | <http://vk.com/game\\_i&#x64;**#your-info>\*\*                       |
| Yandex      | <http://yandex.com/games/app/game\\_i&#x64;**?payload=your-info>\*\* |
| Crazy Games | crazygames.com/game/game\_nam&#x65;**?payload=your-info**            |
| Mock        | site.com/game\_nam&#x65;**?payload=your-info**                       |

#### Domain Information <a href="#domain-information" id="domain-information"></a>

Retrieve the top-level domain of the platform to handle domain-specific configurations and behavior.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FQTIoHQiB9zbjk1ggxTAb%2FScreenshot%202025-07-11%20at%204.39.46%E2%80%AFPM.png?alt=media&#x26;token=a8151fe6-297c-4b18-9e77-4e1c1cac61bd" alt=""><figcaption></figcaption></figure>

Returns the top-level domain (TLD) of the platform. If there is no data – `null`. If the data is available – `com`, `ru`, etc.

#### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Sending a Message to the Platform <a href="#sending-a-message-to-the-platform" id="sending-a-message-to-the-platform"></a>

{% hint style="warning" %}
The call to <mark style="color:purple;">send message</mark> with the parameter <mark style="color:orange;">game\_ready</mark> is mandatory!

Don't forget to implement it. Send this message only when the game is fully loaded.
{% endhint %}

Send predefined messages to the platform to trigger specific actions or events, such as signaling that the game is ready.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FBdvWKX7SylrwENvusUda%2FScreenshot%202025-07-11%20at%204.41.19%E2%80%AFPM.png?alt=media&#x26;token=8ffb97f5-38ae-4d44-a010-09b7cf4f43ef" alt=""><figcaption></figcaption></figure>

| Message                    | Parameters                                     | Description                                                                                    |
| -------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| game\_ready                | No parameters                                  | The game has loaded, all loading screens have passed, the player can interact with the game.   |
| in\_game\_loading\_started | No parameters                                  | Any loading within the game has started. For example, when a level is loading.                 |
| in\_game\_loading\_stopped | No parameters                                  | In-game loading has finished.                                                                  |
| player\_got\_achievement   | No parameters                                  | The player reached a significant moment. For example, defeating a boss, setting a record, etc. |
| level\_started             | <p>Optional. "world" <br>Optional. "level"</p> | Gameplay has started. For example, the player has entered a level from the main menu.          |
| level\_completed           | <p>Optional. "world" <br>Optional. "level"</p> | Gameplay has completed. For example, the player won level.                                     |
| level\_failed              | <p>Optional. "world" <br>Optional. "level"</p> | Gameplay has failed. For example, the player lost level.                                       |
| level\_paused              | <p>Optional. "world" <br>Optional. "level"</p> | Gameplay has paused. Opened settings menu or used pause button                                 |
| level\_resumed             | <p>Optional. "world" <br>Optional. "level"</p> | Gameplay has resumed. Returned from settings menu or hit unpause button                        |

#### Is Audio Enabled

Check if the audio is turned on on the platform.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FVYqbXIbIrloLdvbycpVB%2FScreenshot%202025-07-25%20at%2010.10.01%E2%80%AFAM.png?alt=media&#x26;token=50261047-2cac-4b20-be76-af0a98a7a375" alt=""><figcaption></figcaption></figure>

#### Pause

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FRNOK4c1fpD6OAwaOOi4I%2FScreenshot%202025-07-25%20at%2010.10.34%E2%80%AFAM.png?alt=media&#x26;token=e1921af8-f470-4083-aee4-c7bf0c6508d4" alt=""><figcaption></figcaption></figure>

#### Current Visibility State <a href="#current-visibility-state" id="current-visibility-state"></a>

Check if the game tab is visible or hidden, and adjust game behavior accordingly, such as muting sound when hidden.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FyXsjem72nvhhQj5Eedsp%2FScreenshot%202025-07-11%20at%204.42.50%E2%80%AFPM.png?alt=media&#x26;token=89b6e9b6-d016-4c58-9517-7603a508214c" alt=""><figcaption></figcaption></figure>

Returns the current visibility state of the game (the tab with the game). Possible values: `visible`, `hidden`.

{% hint style="info" %}
React to visibility state changes. For example, mute the game sound when `hidden` and unmute when `visible`.
{% endhint %}
