---
sidebar_position: 0
---

# display

The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
features it supports.

## Methods

### getCapabilities()

The `getCapabilities()` method returns a list of all supported front capabilities of the device.

For more information what are capabilities, see the description of the `supports()` method.

```ts expandable
getCapabilities(): Promise<DisplayCapability[]>;
// show-more
type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_STORAGE' | 'FILE_SYSTEM_FILE_CHECKSUM' | 'FILE_SYSTEM_LINK' | 'TIMERS_PROPRIETARY' | 'VIDEO_4K' | 'SERIAL' | 'BARCODE_SCANNER' | 'FRONT_OSD' | 'FILE_SYSTEM_CREATE_ARCHIVE' | 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' | 'BROWSER' | 'PROXIMITY_SENSOR' | AnyString;

type AnyString = string & {};

```

#### Return value

Resolves to an array of supported capabilities.

#### Example

```ts
const capabilities = await sos.display.getCapabilities();
console.log('Supported display capabilities:', capabilities.join(', '));
```

<Separator />

### supports()

The `supports()` method determines whether the device supports a queried capability.

#### What are capabilities?
Capabilities are features or functionalities that a device can support. We divided those capabilities into `front` and `management` capabilities.
This section is about front capabilities, which include features like handling serial ports, video and stream playback, and more.

On the other hand, the `management` capabilities are features that are related to the application management, such as app upgrade, app version, and more.
To check `management` capabilities, refer to the `sos.management.supports()` method or [this section](https://developers.signageos.io/sdk/sos_management/#supports).

:::tip
If you want to check specific capabilities, refer to the sidebar for the selected management section. Every section has its capabilities written in the description,
or check the **DisplayCapability** type in `supports()` methods. It has a list of all available capabilities for all platforms.
:::

```ts expandable
supports(capability: DisplayCapability): Promise<boolean>;
// show-more
type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_STORAGE' | 'FILE_SYSTEM_FILE_CHECKSUM' | 'FILE_SYSTEM_LINK' | 'TIMERS_PROPRIETARY' | 'VIDEO_4K' | 'SERIAL' | 'BARCODE_SCANNER' | 'FRONT_OSD' | 'FILE_SYSTEM_CREATE_ARCHIVE' | 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' | 'BROWSER' | 'PROXIMITY_SENSOR' | AnyString;

type AnyString = string & {};

```

#### Params

| Name         | Type                | Required         | Description                          |
|--------------|---------------------|------------------|--------------------------------------|
| `capability` | `DisplayCapability` |  <div>Yes</div>  | The capability to check for support. |

#### Return value

Resolves to `true` if the capability is supported, otherwise `false`.

## API Example

```ts
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.');
	}
});

```