Skip to main content

Other SDK objects and parameters

Screen object

Contains settings for working with the screen:

{
fullscreen: {
status: function(): "on"|"off",
request: function(): nil,
exit: function(): nil
},
orientation: {
get: function(): "portrait"|"landscape",
set: function(value: "portrait"|"landscape")
}
}
warning

Yandex Games may automatically start in full-screen mode, but many browsers prohibit switching modes without user command.

In the upper right corner of the Yandex Games screen, a button to switch to full-screen mode is already implemented, so use the parameters of the screen.fullscreen object to process buttons directly in the game.

Clipboard object

Intended for writing a string to the clipboard using the method ysdk.clipboard.write_text(text: string).

Device_info object

Intended for obtaining information about the user's device using the method ysdk.device_info.

{
type: "mobile"|"desktop"|"tablet"|"tv",
isMobile: boolean,
isDesktop: boolean,
isTablet: boolean,
isTV: boolean,
}