display
The sos.display
API groups together methods for getting information about the device. Primarily to find out which
features it supports.
List of all display capabilities
Capability | Description |
---|---|
FILE_SYSTEM_INTERNAL_STORAGE | If device supports internal storage |
FILE_SYSTEM_EXTERNAL_STORAGE | If device supports external storage |
FILE_SYSTEM_FILE_CHECKSUM | If device supports file checksum calculation |
FILE_SYSTEM_LINK | If device supports file system link() |
FILE_SYSTEM_CREATE_ARCHIVE | If device supports creating archives in the file system |
FILE_SYSTEM_ARCHIVE_EXTRACT_INFO | If device can determine a total size of a potentially extracted archive |
TIMERS_PROPRIETARY | If device supports proprietary timers |
VIDEO_4K | If device supports 4K video playback |
BROWSER | If device supports opening browser |
SERIAL | If device supports serial port communication |
BARCODE_SCANNER | If device supports barcode scanner setup |
FRONT_OSD | If device supports Front OSD (our on-screen display) |
PROXIMITY_SENSOR | If device supports proximity sensor |
Methods
supports()
The supports()
method determines whether a queried capability is supported by the device.
supports(capability: DisplayCapability): Promise<boolean>;
Params
Name | Type | Description |
---|---|---|
capability | DisplayCapability | - The capability to check for support. |
Return value
Resolves to true
if the capability is supported, otherwise false
.
API Example
import { sos } from '@signageos/front-applet';
void sos.onReady(async () => {
const supports = await sos.display.supports('SERIAL');
if (supports) {
console.log('This device supports serial port.');
} else {
console.log('This device does NOT support serial port.');
}
});