Members
#
(static) alias :string
Example
// 'other'
Playtech.API.device.alias;
#
(static) browserLanguage :string
Detected browser language.
Example
// 'en'
Playtech.API.device.browserLanguage;
#
(static) browserName :string
Detected browser name.
Example
// 'chrome'
Playtech.API.device.browserName;
#
(static) browserVersion :string
Detected browser version.
Example
// '102'
Playtech.API.device.browserVersion;
Client platform.
Example
// 'web'
Playtech.API.device.clientPlatform;
Delivery platform.
Example
// 'Hub2'
Playtech.API.device.deliveryPlatform;
#
(static) deviceId :string
Device ID.
Example
// '7914165b-9d1e-46fc-ae09-f1e04f438a27'
Playtech.API.device.deviceId;
One of 'mobile', 'tablet' or 'desktop'.
Example
// 'desktop'
Playtech.API.device.formFactor;
#
(static) isCrawled :boolean
Example
// false
Playtech.API.device.isCrawled;
#
(static) isDesktop :boolean
Whether device is desktop.
Example
// true
Playtech.API.device.isDesktop;
#
(static) isInWrapper :boolean
Whether portal was opened in wrapper.
Example
// true
Playtech.API.device.isInWrapper;
#
(static) isLandscape :boolean
Whether device is in landscape.
Example
// false
Playtech.API.device.isLandscape;
#
(static) isMobile :boolean
Whether device is mobile.
Example
// false
Playtech.API.device.isMobile;
#
(static) isOtherBrowser :boolean
Whether browser is not 'chrome', 'edge', 'firefox' nor 'safari'.
Example
// false
Playtech.API.device.isOtherBrowser;
#
(static) isOtherOs :boolean
Whether os is not 'android', 'ios', 'windows' nor 'macintosh'.
Example
// false
Playtech.API.device.isOtherOs;
#
(static) isPortrait :boolean
Whether device is in portrait mode.
Example
// false
Playtech.API.device.isPortrait;
#
(static) isTablet :boolean
Whether device is tablet.
Example
// false
Playtech.API.device.isTablet;
#
(static) isTouchDevice :boolean
Whether device supports touch-handlers.
Example
// false
Playtech.API.device.isTouchDevice;
#
(static) name :string
Detected device name.
Example
// 'windows'
Playtech.API.device.name;
#
(static) orientation :string
Device orientation. Could be portrait or landscape.
Example
// 'portrait'
Playtech.API.device.orientation;
#
(static) os :string
Detected device OS.
Example
// 'windows'
Playtech.API.device.os;
#
(static) osVersion :string|number
Detected device OS version.
Example
// 11
Playtech.API.device.osVersion;
#
(static) ua :string
Browser's user agent string lowercase.
Example
// 'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/102.0.0.0 safari/537.36'
Playtech.API.device.ua;
#
(static) uaOrigin :string
Browser's user agent string.
Example
// 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
Playtech.API.device.uaOrigin;
Methods
#
(static) getId() → {string}
Returns currently Device ID.
Device ID is stored in local storage.
Example
// 'e8ff9bed-6d5c-42f1-babc-7a7fec93fb36'
Playtech.API.device.getId();
#
(static) setId(id)
Permanently set new Device ID.
Parameters:
Name |
Type |
Description |
id |
string
|
|
Example
Playtech.API.device.setId('e8ff9bed-6d5c-42f1-babc-7a7fec93fb36');