device

Playtech.API. device

Members

# (static) alias :string

Type:
  • string
Example
// 'other'
Playtech.API.device.alias;

# (static) browserLanguage :string

Detected browser language.
Type:
  • string
Example
// 'en'
Playtech.API.device.browserLanguage;

# (static) browserName :string

Detected browser name.
Type:
  • string
Example
// 'chrome'
Playtech.API.device.browserName;

# (static) browserVersion :string

Detected browser version.
Type:
  • string
Example
// '102'
Playtech.API.device.browserVersion;

# (static) clientPlatform :string

Client platform.
Type:
  • string
Example
// 'web'
Playtech.API.device.clientPlatform;

# (static) deliveryPlatform :string

Delivery platform.
Type:
  • string
Example
// 'Hub2'
Playtech.API.device.deliveryPlatform;

# (static) deviceId :string

Device ID.
Type:
  • string
Example
// '7914165b-9d1e-46fc-ae09-f1e04f438a27'
Playtech.API.device.deviceId;

# (static) formFactor :string

One of 'mobile', 'tablet' or 'desktop'.
Type:
  • string
Example
// 'desktop'
Playtech.API.device.formFactor;

# (static) isCrawled :boolean

Type:
  • boolean
Example
// false
Playtech.API.device.isCrawled;

# (static) isDesktop :boolean

Whether device is desktop.
Type:
  • boolean
Example
// true
Playtech.API.device.isDesktop;

# (static) isInWrapper :boolean

Whether portal was opened in wrapper.
Type:
  • boolean
Example
// true
Playtech.API.device.isInWrapper;

# (static) isLandscape :boolean

Whether device is in landscape.
Type:
  • boolean
Example
// false
Playtech.API.device.isLandscape;

# (static) isMobile :boolean

Whether device is mobile.
Type:
  • boolean
Example
// false
Playtech.API.device.isMobile;

# (static) isOtherBrowser :boolean

Whether browser is not 'chrome', 'edge', 'firefox' nor 'safari'.
Type:
  • boolean
Example
// false
Playtech.API.device.isOtherBrowser;

# (static) isOtherOs :boolean

Whether os is not 'android', 'ios', 'windows' nor 'macintosh'.
Type:
  • boolean
Example
// false
Playtech.API.device.isOtherOs;

# (static) isPortrait :boolean

Whether device is in portrait mode.
Type:
  • boolean
Example
// false
Playtech.API.device.isPortrait;

# (static) isTablet :boolean

Whether device is tablet.
Type:
  • boolean
Example
// false
Playtech.API.device.isTablet;

# (static) isTouchDevice :boolean

Whether device supports touch-handlers.
Type:
  • boolean
Example
// false
Playtech.API.device.isTouchDevice;

# (static) name :string

Detected device name.
Type:
  • string
Example
// 'windows'
Playtech.API.device.name;

# (static) orientation :string

Device orientation. Could be portrait or landscape.
Type:
  • string
Example
// 'portrait'
Playtech.API.device.orientation;

# (static) os :string

Detected device OS.
Type:
  • string
Example
// 'windows'
Playtech.API.device.os;

# (static) osVersion :string|number

Detected device OS version.
Type:
  • string | number
Example
// 11
Playtech.API.device.osVersion;

# (static) ua :string

Browser's user agent string lowercase.
Type:
  • string
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.
Type:
  • 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.
Returns:
Type
string
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');