> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-en/common/screen/properties.md).

# Screen properties

***

### 1. Set screen orientation (`setDeviceOrientation`)

Set the device's screen orientation to landscape or portrait. If you need to change the orientation only on a specific screen, make sure to restore the original orientation when leaving the screen.

**Signature**

```typescript
function setDeviceOrientation(options: { type: 'portrait' | 'landscape' }): Promise<void>;
```

**Parameters**

* **options.type** · Required · `'portrait' | 'landscape'`

  Specify the screen orientation. `portrait`is portrait mode, `landscape`is landscape mode.

**Example**

{% tabs %}
{% tab title="Web (JS)" %}

```js
import { setDeviceOrientation } from '@apps-in-toss/web-framework';

setDeviceOrientation({ type: 'landscape' });
```

{% endtab %}

{% tab title="Web (React)" %}

```tsx
import { setDeviceOrientation } from '@apps-in-toss/web-framework';
import { useEffect } from 'react';

function VideoScreen() {
  useEffect(() => {
    setDeviceOrientation({ type: 'landscape' });

    return () => {
      setDeviceOrientation({ type: 'portrait' }); // Restore when leaving the screen.
    };
  }, []);
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
import { setDeviceOrientation } from '@apps-in-toss/framework';
import { useEffect } from 'react';

function VideoScreen() {
  useEffect(() => {
    setDeviceOrientation({ type: 'landscape' });

    return () => {
      setDeviceOrientation({ type: 'portrait' }); // Restore when leaving the screen.
    };
  }, []);
}
```

{% endtab %}
{% endtabs %}

***

### 2. Set screen always-on (`setScreenAwakeMode`)

Set the screen so it does not turn off automatically. Useful in situations where the screen needs to stay on continuously, such as webtoons, videos, or reading documents. If used only on a specific screen, make sure to disable it when leaving the screen.

**Signature**

```typescript
function setScreenAwakeMode(options: { enabled: boolean }): Promise<{ enabled: boolean }>;
```

**Parameters**

* **options.enabled** · Required · `boolean`

  `true`If set to, the screen will stay on, `false`If set to, it will turn off according to the default screensaver timeout.

**Example**

{% tabs %}
{% tab title="Web (React)" %}

```tsx
import { setScreenAwakeMode } from '@apps-in-toss/web-framework';
import { useEffect } from 'react';

function MediaScreen() {
  useEffect(() => {
    setScreenAwakeMode({ enabled: true });

    return () => {
      setScreenAwakeMode({ enabled: false }); // Restore when leaving the screen.
    };
  }, []);
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
import { setScreenAwakeMode } from '@apps-in-toss/framework';
import { useEffect } from 'react';

function MediaScreen() {
  useEffect(() => {
    setScreenAwakeMode({ enabled: true });

    return () => {
      setScreenAwakeMode({ enabled: false }); // Restore when leaving the screen.
    };
  }, []);
}
```

{% endtab %}
{% endtabs %}

***

### 3. Block screen capture (`setSecureScreen`)

Block screen capture at the native level. This can be used on screens that display sensitive information such as account balances and transaction history.

**Signature**

```typescript
function setSecureScreen(options: { enabled: boolean }): Promise<{ enabled: boolean }>;
```

**Parameters**

* **options.enabled** · Required · `boolean`

  `true`If enabled, screen capture is blocked, `false`If disabled, it is allowed.

**Example**

```tsx
import { setSecureScreen } from '@apps-in-toss/framework';
import { useEffect } from 'react';

function SecureScreen() {
  useEffect(() => {
    setSecureScreen({ enabled: true });

    return () => {
      setSecureScreen({ enabled: false }); // Disable blocking when leaving the screen.
    };
  }, []);
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-en/common/screen/properties.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
