Create custom GUI with lib-jitsi-meet on docker installation

Hi,

I have been installed and configed jitsi ( Docker installation ) by this document.

Everything has been ok and I could use it by self hosting.

But when I want to change interface by using Jitsi Lib API (low level) and setting this value as a config file:

const options = { hosts: { domain: 'https://meet.mydomain.com', }, bosh: https://meet.mydomain.com/http-bind?room=508ece7e2ff422891badc67b26a77c4, }

I’ve got this error:

Is there any problem in my coding?

1 Like

AFAIK, UI should be hosted using the same domain address to prevent the CORS issue.

Thank you for your kind.

According to your reply I think I should set domain URL when docker was installing like this .env file:

Q1: When Docker was installing, it’s used an internal address how could I change it?
Q2: When react Jitsi is used as an I frame API , everything is OK but when I used it by lib-jitsi-meet I’ve got this error. :frowning:

I think you don’t need to change anything on Jitsi side. UI’s domain (the referrer address) should be the same or it’s needed to change Javascript HTTPrequest codes on UI to allow CORS (I think this is more complicated than the previous one)

Since UI is hosted on the same server in the iframe case, it should work without any CORS issue

cloud you explain more, please.

It’s a bit difficult to explain how CORS works in a post but there are many good articles in the Internet. Both sides (server and client) should be configured correctly when the domains don’t match

Hi,
I’ve set these values in nginx config and fortunately my problem about CORS have been solved. :slight_smile:

proxy_hide_header 'access-control-allow-origin';
add_header 'access-control-allow-origin' '*';

But now i’ve seen this error that caused connection fail.


1 Like

dear community
anybody can’t help me

Hi everybody,
finally my problem was solved.

I’ve changed values of options to this, and now everything is ok.

const options = {
hosts: {
anonymousdomain: "guest.meet.jitsi",
authdomain: "meet.jitsi",
domain: "meet.jitsi",
muc: "muc.meet.jitsi"
},
enableP2P: true,
p2p: {
enabled: true,
preferH264: true,
disableH264: true,
useStunTurn: true,
},
useStunTurn: true,
bosh: https://meet.mydomain.com/http-bind?room=roomName,
}

Hope this answer is usfull for everybody :wink:

1 Like