> For the complete documentation index, see [llms.txt](https://doc.ozforensics.com/oz-knowledge-ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ozforensics.com/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/sdk/websdk/web-plugin/zapusk-plagina/zapusk-web-plugin-v-iframe.md).

# Запуск Web Plugin в iframe

Web Plugin может работать внутри iframe. Для этого необходимо разрешить использование камеры в iframe, а все задействованные страницы должны быть указаны в вашей лицензии и работать по HTTPS.

## **Быстрый старт**

{% code title="" expandable="true" %}

```html
<iframe src="https://your-domain.example/liveness-page" allow="camera"></iframe>
```

{% endcode %}

Атрибут `allow="camera"` обязателен, иначе браузер заблокирует доступ к камере, и плагин не сможет запуститься.

## **Требования**

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Требование</th><th>Применяется к</th></tr></thead><tbody><tr><td><code>allow="camera"</code> в теге iframe</td><td>каждому iframe в цепочке</td></tr><tr><td>HTTPS</td><td>родительской странице и странице с плагином</td></tr><tr><td>Домен указан в вашей лицензии</td><td>родительской странице и странице с плагином</td></tr><tr><td>Тот же origin, что и у страницы с плагином</td><td>родительская страница — см. <a href="#roditelskaya-stranica-na-drugom-domene">Родительская страница на другом домене</a></td></tr></tbody></table>

{% hint style="info" %}
Если ваш iframe содержит другой iframe, на каждом уровне нужен свой `allow="camera"`: внешняя страница добавляет его в iframe с оберткой, а страница-обертка добавляет его в iframe с плагином. Отсутствие атрибута на любом уровне блокирует камеру для всего, что находится ниже.
{% endhint %}

## **Устранение неполадок**

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Проблема</th><th>Причина</th><th>Решение</th></tr></thead><tbody><tr><td>Диалог запроса разрешения на использование камеры не появляется; <code>on_error</code> получает <code>error_no_camera</code> (<code>error_no_camera_ios</code> на iOS, <code>error_no_camera_android</code> на Android)</td><td>У одного из iframe в цепочке нет <code>allow="camera"</code></td><td>Добавьте <code>allow="camera"</code> в каждый iframe в цепочке</td></tr><tr><td><code>Connection error. Please use HTTPS to connect.</code></td><td>Родительская страница или страница с плагином работает по HTTP</td><td>Обеспечьте работу обеих страниц по HTTPS</td></tr><tr><td><code>License error. Origin https://… is not in the list premitted by license</code></td><td>Домен этой страницы не входит в вашу лицензию</td><td>Обратитесь к представителю Oz, чтобы добавить домен</td></tr><tr><td><code>Check same-origin policy of parent windows. Plugin should check host of each window.</code></td><td>Родительская страница находится на другом origin, чем страница с плагином</td><td>Обратитесь к представителю Oz — для этой конфигурации требуется дополнительная настройка на стороне сервера</td></tr></tbody></table>

### **Родительская страница на другом домене**

Плагин считывает адрес каждого родительского окна, чтобы сверить его с вашей лицензией. Когда родительская страница находится на другом origin, браузер блокирует это считывание, и проверка не может завершиться. Эта конфигурация поддерживается, но требует дополнительной настройки на стороне Web-адаптера — обратитесь к представителю Oz.

## **Если вы раньше использовали `iframe_allowed`**

`iframe_allowed` больше не используется. Поддержка iframe включена всегда, и достаточно выполнить требования выше, поэтому просто удалите этот параметр из файла конфигурации Web Adapter.


---

# 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://doc.ozforensics.com/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/sdk/websdk/web-plugin/zapusk-plagina/zapusk-web-plugin-v-iframe.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.
