Put openVidu in an iframe

I am trying to get openvidu to work within an iFrame (from a different domain I control).

At first, the openVidu page wasn’t displaying at all, and I got the response header:
X-Frame-Options: SAMEORIGIN

In order to stop getting this response, I made the following changes in the nginx configuration files.

In the file:
/etc/nginx/sites-enabled/default

I Changed:
add_header X-Frame-Options "SAMEORIGIN";

To:
add_header X-Frame-Options "";

This allowed the openVidu page to be displayed in the iFrame.

However, I still cannot connect to a GetARoom call within the iframe.

I get Permission denied in the console:

And get the response header:
X-Frame-Options: DENY

From the openVidu server (wss://mydomain.com:4443/openvidu)

I tried to make the following change in the file:
/etc/nginx/sites-enabled/kms-ov

In which I Added:
add_header X-Frame-Options "";

But that didn’t work.

Is there anything else I can change to run openVidu GetaRoom in an iFrame?

(I’ll use a content security policy, but I would like to get this working first)

Thanks.

In the past we manage to make an OpenVidu app working in an iframe. But we don’t have the project at hand. So, it is possible.

Please continue your investigation and share with us the changes needed to make it working.

Also, maybe you can consider converting get a room app into a webcomponent to make easier integrating it in other webpages.

Im using OpenVidu app inside IFrame.
There was the same proble with media.
I added to Iframe **allow="camera ;microphone "
Maybe this will help

1 Like