Cannot join the conference created by lib-jitsi-meet in a headless browser

允我心安 提交于 2021-01-28 09:00:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!