# Webrtc for inline frame in perspective

**URL:** <https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 16, 2025, 8:16pm UTC](https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352 "2025-05-16T20:16:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigo.estrella](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rodrigo.estrella](https://forum.inductiveautomation.com/u/rodrigo.estrella)\
**Post date:** [May 16, 2025, 8:16pm UTC](https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352/1 "2025-05-16T20:16:37Z")

</div>

Hello,

I am trying to use an inline frame component to render an sipjs client.  
I can verify the page works and is able to find the media devices when rendering the html alone.  
The issue is when I render in the perspective, it fails getting local media with the error:

```python
NotAllowedError: The request is not allowed by the user agent or the platform in the current context.

```

I read a post that the `allow` property is not set-able in the inline frame component, and the documentation doesn't mention it either. Am I just out of luck using out of the box components for this?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 16, 2025, 9:57pm UTC](https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352/2 "2025-05-16T21:57:50Z")

</div>

You have to set XFrame options or Content Security Policy headers in the inner site. Your browser is enforcing content security to avoid cross-domain security hazards.

Nothing to be done about it in Ignition.

---

<div class="post-metadata">

**Author:** ![rodrigo.estrella](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rodrigo.estrella](https://forum.inductiveautomation.com/u/rodrigo.estrella)\
**Post date:** [May 16, 2025, 10:52pm UTC](https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352/3 "2025-05-16T22:52:18Z")

</div>

Sorry, I think saying "rendering" might've implied something different. The iframe loads and I can see the controls I want for my simple sipjs client, here are the headers:

```python
HTTP/1 200 OK
Server: SimpleHTTP/0.6 Python/3.12.3
Date: Fri, 16 May 2025 22:44:08 GMT
Content-type: text/html
Content-Length: 2685
Last-Modified: Fri, 16 May 2025 16:17:42 GMT
X-Frame-Options: ALLOW-FROM https://192.168.1.105:8043
Content-Security-Policy: frame-ancestors 'self' https://192.168.1.105:8043;
Permissions-Policy: microphone=(self https://192.168.1.105:8043)

```

The issue I think is that I cannot set allow="microphone" in the iframe. I would love to be proven wrong though.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 16, 2025, 10:58pm UTC](https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352/4 "2025-05-16T22:58:00Z")

</div>

Ah.

Sorry, no further clue.

---

<div class="post-metadata">

**Author:** ![rodrigo.estrella](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rodrigo.estrella](https://forum.inductiveautomation.com/u/rodrigo.estrella)\
**Post date:** [July 25, 2025, 10:38pm UTC](https://forum.inductiveautomation.com/t/webrtc-for-inline-frame-in-perspective/106352/5 "2025-07-25T22:38:36Z")

</div>

I was able to make a custom iframe component to make `allow` configurable. It works in the browser, but it does not work in Perspective Workstation or the Perspective app.

In Workstation I see the error:

```python
ERROR [RuntimeException] [2025/07/25 15:07:28]: Uncaught exception in thread: Browser Thread: b362ec87-8fca-47d1-96d9-592af8bf1a79
java.lang.IllegalStateException
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at com.teamdev.jxbrowser.frame.internal.FrameImpl.of(FrameImpl.java:122)
	at com.teamdev.jxbrowser.navigation.event.NavigationFinished.frame(NavigationFinished.java:32)
	at com.inductiveautomation.ignition.launcher.workstation.bridge.WorkstationBridge.lambda$initializeBrowserCallbacks$14(WorkstationBridge.java:249)
	at com.teamdev.jxbrowser.event.internal.NewObservableHelper.notifyObservers(NewObservableHelper.java:57)
	at com.teamdev.jxbrowser.internal.rpc.stream.EventStream.dispatch(EventStream.java:64)
	at com.teamdev.jxbrowser.internal.rpc.stream.EventStream.process(EventStream.java:114)
	at com.teamdev.jxbrowser.internal.rpc.stream.Stream$StreamObserver.lambda$onNext$0(Stream.java:238)
	at com.teamdev.jxbrowser.internal.RpcThreadImpl$TaskRunner.processTasks(RpcThreadImpl.java:175)
	at java.base/java.lang.Thread.run(Thread.java:840)

```

So I am assuming that the IA implementation of `jxbrowser` does not have a PermissionHandler for `getUserMedia` requests

Is this something that is worth a feature request?
