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 start in fullscreen mode, but many browsers prohibit switching modes without a user command.

Yandex Games already has a button in the upper-right corner for switching to full screen, so use the screen.fullscreen object parameters to handle button clicks 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

Use the ysdk.deviceInfo() method of this object to get 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 — another 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

Our support team can help publish finished games or WebApps on Yandex Games. If you have any questions about development or testing, ask them in the Discord channel.

If you are facing an issue or have a question regarding the use of Yandex Games SDK, please contact support:

Write to chat