Skip to main content

XR8.XrDevice.incompatibleReasons()

XR8.XrDevice.incompatibleReasons({ allowedDevices })

Description

Returns an array of XR8.XrDevice.IncompatibilityReasons why the device the device and browser are not supported. This will only contain entries if XR8.XrDevice.isDeviceBrowserCompatible() returns false.

Parameters

ParameterDescription
allowedDevices [Optional]Supported device classes, a value in XR8.XrConfig.device().

Returns

Returns an array of XR8.XrDevice.IncompatibilityReasons.

Example

const reasons = XR8.XrDevice.incompatibleReasons()
for (let reason of reasons) {
switch (reason) {
case XR8.XrDevice.IncompabilityReasons.UNSUPPORTED_OS:
// Handle unsupported os error messaging.
break;
case XR8.XrDevice.IncompabilityReasons.UNSUPPORTED_BROWSER:
// Handle unsupported browser
break;
...
}