For the complete documentation index, see llms.txt. This page is also available as Markdown.

Device

You are reading the documentation for Bridge SDK v2. If you need the obsolete v1 documentation, see Documentation (v1).

Read-only information about the player's device. Use it to switch UI layouts, input schemes, or asset quality between mobile, tablet, desktop, and tv.

Device Type

Use this value for broad adaptation only, such as mobile controls, desktop hotkeys, or lower-quality assets on small devices.

bridge.device.type

Possible values: mobile, tablet, desktop, tv.

Platform support · all 26 platforms

Supports: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playdeck, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Device OS

Returns the operating system of the player's device.

Exposed in the Plain JS SDK only. The engine plugins do not wrap this property — call the JS API from your engine's JS interop if you need it there.

bridge.device.os

Possible values: windows, macos, linux, android, ios, other.

Orientation

Returns the current screen orientation and lets you react when the player rotates the device.

Exposed in the Plain JS SDK only. The engine plugins do not wrap the orientation API — use the built-in orientation popup below or your engine's JS interop.

If your game supports only one orientation, Bridge can show a built-in "rotate the device" overlay on mobile devices. Enable it in the config:

supportedOrientations lists the orientations your game supports (portrait, landscape); with useBuiltInOrientationPopup: true the overlay appears whenever the device is rotated to an unsupported one.

Screen Size

Listen for viewport size changes (debounced) to adapt the layout.

Exposed in the Plain JS SDK only. The engine plugins do not wrap this event — most engines provide their own viewport resize callbacks.

Safe Area

Returns the safe-area insets in pixels — the area not covered by notches, rounded corners, or platform UI. Use it to keep HUD elements visible.

Among the engine plugins, safe area is currently wrapped in Unity only.

Bridge can also apply safe-area padding to the page automatically — set game.adaptToSafeArea to true in the config.

Last updated