datalad-datasets / ohbm2020-posters

Centralized registry of Jitsi rooms and pdfs for OHBM 2020 posters.
https://datalad-datasets.github.io/ohbm2020-posters
32 stars 84 forks source link

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

Open katjaq opened 4 years ago

katjaq commented 4 years ago

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 commented 4 years ago

Attn @soichih

soichih commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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

r03ert0 commented 4 years ago

awesome!! \o/

r03ert0 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

I will reopen since we last discussion here...

r03ert0 commented 4 years ago

how sweet!

katjaq commented 4 years ago

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 commented 4 years ago

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 357b8c0c071cdbc58399f5b3b08aa9b8fc2598ae . Feel welcome to improve referencing/styling in the top of the page, whatever!