Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

Embed jitsi in the webpage: that should let us know when someone leaves a room #59

Open
katjaq opened this issue Jun 25, 2020 · 15 comments

Comments

@katjaq
Copy link
Contributor

katjaq commented Jun 25, 2020

Here's a simple repo showing how to embed many jitsies: https://github.com/r03ert0/manyjitsis

The code is basically:

const domain = 'meet.jit.si';
  const {offsetWidth: width, offsetHeight: height} = document.querySelector("#jitsi");
  const options = {
    roomName: 'OpenForumMainRoom',
    width, height,
    parentNode: document.querySelector('#jitsi'),
    configOverwrite: {
      startWithAudioMuted: true
    }
  };
  let api = new JitsiMeetExternalAPI(domain, options);

which supposes there's a div with id="jitsi".

@yarikoptic
Copy link
Contributor

Attn @soichih

@soichih
Copy link
Collaborator

soichih commented Jun 26, 2020

@katjaq I ended up doing this to detect for someone closing the window

function openJit(url, number) {
    wss.send(JSON.stringify({action: "jit", id: number}));
    let child = window.open(url, "jit"+number);
    let timer = setInterval(()=>{
        if(child.closed) {
            wss.send(JSON.stringify({action: "jitclose", id: number}));
            clearInterval(timer);
        }
    }, 1000);
}

This seems to work.. but I will try the JitsiMeetExternalAPIapproach if it doesn't work still. Thank you for letting me know about this API!

@r03ert0
Copy link

r03ert0 commented Jun 26, 2020

awesome! we'll integrate that in brainweb as well. We started exploring using jitsi's data channel for allowing feedback (many other things could be done with it!). It would be wonderful if you guys were willing to keep pushing this with us after the OHBM meeting <3

@yarikoptic
Copy link
Contributor

I think it was done by @soichih, so we are all set ! ;)

@r03ert0
Copy link

r03ert0 commented Jun 27, 2020

awesome!! \o/

@r03ert0
Copy link

r03ert0 commented Jun 27, 2020

Hello datafriends! we did a thing with @katjaq using your wss & data :)
We wanted to have an easier way of seeing who's connected and not. We made a screen with squares showing room occupancy (we also added the emoji feedback :p). Hope you'll like it! <3

https://brain-web.github.io/ohbm2020/index.html

@effigies
Copy link
Collaborator

effigies commented Jun 27, 2020

That is really cool. Do we know anything about the number blocks? Could we split it by category to make it easier to narrow down which green squares to check out?

Or possibly add a search filter that will reduce the blocks to matching posters?

@r03ert0
Copy link

r03ert0 commented Jun 27, 2020

yes! we could change the background colour to reflect the category, or add a filter base on the keywords. I'll try to recycle brainweb's community graph viewer to make a network of similar posters (and whether they are active or not :D)

@yarikoptic
Copy link
Contributor

abstracts.json already has bag of words for each abstract - might help to relate?
Coming from your ui to the room talks to soichis backend to announce count, right?
When you are ready (now?) we should add a list of alternative web UIs on top of our page.

@r03ert0
Copy link

r03ert0 commented Jun 27, 2020

now is good!

yes, I talk to @soichih's websocket, so that it doesn't matter which UI people use to connect, the counts will be the same :)

(checking abstracts.json, how cool!)

@yarikoptic
Copy link
Contributor

yarikoptic commented Jun 27, 2020

BTW, forgot to mention open project which I hoped would be our gather town but it is one man effort AFAIK, but might give good ideas etc: https://github.com/capnmidnight/Calla

@yarikoptic
Copy link
Contributor

I will reopen since we last discussion here...

@yarikoptic yarikoptic reopened this Jun 27, 2020
@r03ert0
Copy link

r03ert0 commented Jun 27, 2020

how sweet!

@katjaq
Copy link
Contributor Author

katjaq commented Jun 27, 2020

wow! this is a lovely gather space! thanks for sharing @yarikoptic hehe, then we can have you on gathertown, on jitsi, on zoom, and on this lovely calla gather space! :D mindblowing! ;)

@yarikoptic
Copy link
Contributor

I have not tried calla for a while -- when I tried it was not yet ready, but if you try and see what/how to fixup -- we might end up indeed with our very own gather place! Meanwhile -- added a quick reference to BrainWeb in 357b8c0 . Feel welcome to improve referencing/styling in the top of the page, whatever!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants