Other SDK objects and parameters

The screen.fullscreen object

Use this object for working with fullscreen browser mode.

Parameter

Type

Description

STATUS_ON

string

The constant "on".

STATUS_OFF

string

The constant "off".

status

string

The current status STATUS_ON or STATUS_OFF.

request

Promise<void>

The request to enable fullscreen mode.

exit

Promise<void>

The request to exit fullscreen mode.

Alert

Yandex Games can automatically launch in fullscreen mode, but many browsers prohibit switching modes without a user command.

The Yandex Games screen already has a fullscreen button in the top-right corner, so use the screen.fullscreen object parameters to handle buttons directly in the game.

clipboard object

Use the ysdk.clipboard.writeText(text) method of this object for writing a text string to the clipboard.

deviceInfo object

The ysdk.deviceInfo object is designed to obtain information about the user's device.

In the type field, the "desktop" string is returned for a computer, "mobile" for a mobile device, "tablet" for a tablet, or "tv" for a TV, as well as all the methods with one of the values.

Method

Description

isMobile()

Checks the user's device and returns:

  • true: Mobile device
  • false: Other device

isDesktop()

Checks the user's device and returns:

  • true: Computer
  • false: Other device

isTablet()

Checks the user's device and returns:

  • true: Tablet
  • false: Other device

isTV()

Checks the user's device and returns:

  • true: TV
  • false: Other device

Note

Support staff help you publish a ready-made game on the Yandex Games platform. For applied questions about development and testing, other developers will answer in the Discord community.

If you encounter a problem or have a question while using the Yandex Games SDK, contact support:

Write to chat