问题
I'm trying to create a conference using lib-jitsi-meet
in a headless Chrome instance using Puppeteer and join it using the Jitsi External API (iframe API) from another browser. Currently, I can create a meeting in a headless browser, but I can't join the created meeting from another browser. When I tried so, another new conference with the same name is created and I'm the only participant in it.
Can someone provide me with helpful advice on this problem? You can view the index.html and example.js.
Thanks in advance
Puppeteer code
const browser = await puppeteer.launch({
headless: false,
product: 'chrome',
// args: ['wait-for-browser'],
defaultViewport: { width: 1600, height: 1600 },
});
const page = (await browser.pages())[0];
await page.goto("https://jitsi-liveroom.s3.eu-central-1.amazonaws.com/index.html")
回答1:
Using the following options
object as a param to the JitsiConnection
in example.js
, I was able to avoid CORS errors and join multiple users to the same conference.
const [meetingName,setMeetingName] = useState("")
const options = {
hosts: {
domain: 'meet.jit.si',
muc: 'conference.meet.jit.si',
focus: 'focus.meet.jit.si',
},
externalConnectUrl: 'https://meet.jit.si/http-pre-bind',
enableP2P: true,
p2p: {
enabled: true,
preferH264: true,
disableH264: true,
useStunTurn: true,
},
useStunTurn: true,
bosh: `https://meet.jit.si/http-bind?room=${meetingName}`,
websocket: 'wss://meet.jit.si/xmpp-websocket',
clientNode: 'http://jitsi.org/jitsimeet',
}
来源:https://stackoverflow.com/questions/63987162/cannot-join-the-conference-created-by-lib-jitsi-meet-in-a-headless-browser