this-fifo/jutsu

useJitsi not working

rodrigoheck opened this issue ยท 3 comments

I used as a setup and it worked just fine, but I am finding hard to do the same using the Hook version. I did the same as the example provided.

import { useJitsi } from 'react-jutsu'
export default function MyPage(){
const jitsiConfig = {
    roomName: 'konoha',
    displayName: 'Naruto Uzumaki',
    password: 'dattebayo',
    subject: 'fan',
    parentNode: 'jitsi-container',
  };
  const { loading, error, jitsi } = useJitsi(jitsiConfig);
return ()
}

But useJitsi is returning null. Don't know why :(

Hi @rodrigoheck ๐Ÿ‘‹

Can you provide more information of your setup? Did you include the jitsi external api javascript files?

<body>
  <script src='https://meet.jit.si/external_api.js'></script>
</body>

That error sounds like the script is not available from the context that you are trying to invoke it

Take a look at the implementation of the <Jutsu /> component as well, it relies on the useJitsi hook under the hood

Closing this for now, please let me know if you still have issues

Hey, Filipe ๐Ÿ‘
Sorry for the delay. Yes, I included the script on the body of my website. So, before I try doing some more diggings, let me ask if I can accomplish what I want to do with <Jutsu />. I want that the room that is being created on the fly have its own password. It is possible to do it without using Hooks?

EDIT: ok, the password parameter does work. The server I was using before was blocking it, but changing it now solved the problem. Thanks for the attention!