> For the complete documentation index, see [llms.txt](https://doc.ozforensics.com/oz-knowledge/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/guides/developer-guide/sdk/oz-liveness-websdk/web-plugin/launching-the-plugin/running-the-web-plugin-in-an-iframe.md).

# Running the Web Plugin in an iframe

The Web Plugin works inside an iframe. The iframe must be allowed to use the camera, and every page involved must be served over HTTPS and covered by your license.

## **Quick start**

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

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

{% endcode %}

`allow="camera"` is mandatory, otherwise, the browser blocks camera access, and the plugin cannot start.

## **Requirements**

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Requirement</th><th>Applies to</th></tr></thead><tbody><tr><td><code>allow="camera"</code> on the iframe tag</td><td>every iframe in the chain</td></tr><tr><td>HTTPS</td><td>the parent page and the page with the plugin</td></tr><tr><td>Domain listed in your license</td><td>the parent page and the page with the plugin</td></tr><tr><td>Same origin as the page with the plugin</td><td>the parent page – see <em>Parent page on a different domain</em></td></tr></tbody></table>

{% hint style="info" %}
If your iframe contains another iframe, each level needs its own `allow="camera"`: the outer page adds it to the iframe holding the wrapper, and the wrapper page adds it to the iframe holding the plugin. A missing attribute at any level blocks the camera for everything below it.
{% endhint %}

## **Troubleshooting**

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Problem</th><th>Cause</th><th>Solution</th></tr></thead><tbody><tr><td>The camera permission dialog never appears; <code>on_error</code> receives <code>error_no_camera</code> (<code>error_no_camera_ios</code> on iOS, <code>error_no_camera_android</code> on Android)</td><td>An iframe in the chain has no <code>allow="camera"</code></td><td>Add <code>allow="camera"</code> to every iframe in the chain</td></tr><tr><td><code>Connection error. Please use HTTPS to connect.</code></td><td>The parent page or the page with the plugin is served over HTTP</td><td>Serve both over HTTPS</td></tr><tr><td><code>License error. Origin https://… is not in the list premitted by license</code></td><td>The domain of that page is not in your license</td><td>Contact your Oz representative to add the domain</td></tr><tr><td><code>Check same-origin policy of parent windows. Plugin should check host of each window.</code></td><td>The parent page is on a different origin than the page with the plugin</td><td>Contact your Oz representative – this setup needs an additional server-side setting</td></tr></tbody></table>

### **Parent page on a different domain**

The plugin reads the address of every parent window to check it against your license. When the parent page is on a different origin, the browser blocks that read and the check cannot complete. This setup is supported, but it needs an additional setting on the Web Adapter side – contact Oz representative.

## **If you previously used `iframe_allowed`**

`iframe_allowed` is no longer used. iframe support is always on, and the requirements above are all that is needed, so just remove the parameter from the Web Adapter configuration file.


---

# 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/guides/developer-guide/sdk/oz-liveness-websdk/web-plugin/launching-the-plugin/running-the-web-plugin-in-an-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.
