Closed Th3irdEye closed 3 years ago
You could do this, though it isn't super clean at the moment. At some point I may add a better API for this. For now, there are two was you can do it.
Issue the command to other users as the GM to switch the user to a specific room name:
const userId = "fvttUserId"
const breakoutRoom = "breakout-room-name"
game.webrtc.client._jitsiClient.settings.set("client", `users.${userId}.jitsiBreakoutRoom`, breakoutRoom);
game.socket.emit("module.jitsirtc", {action: "breakout", userId: userId, breakoutRoom: breakoutRoom})
To bring them back to the main room, issue the same commands with a blank (""
) breakoutRoom.
Or, you can issue these commands as the user who is being moved. However, this won't track the state of what room they are in on the GM side, so you can't right-click the Player List to join them in the room.
game.webrtc.client._jitsiClient.breakoutRoom="breakout-room-name"
game.webrtc.client.connect()
In both cases, make sure that the breakout room name conforms to Jitsi's requirements (a lot of special characters can't be used, and all letters must be lower case). For the built-in breakout rooms, the code uses randomID(32)
to generate a random room name that fits the standard.
Hope this helps!
So awesome. Thanks for your help. I'll be tinkering with this soon.
I see that this module supports breakout rooms now. I also saw mentioned in a different post the ability to set a static room name via the developer console. I'm not sure if it's possible but for the game I want to run it would be really cool if players were put in different chat rooms based on their location on the map.
Would it be possible to have a macro assign a player to a specific breakout room? I'm thinking of using something like Trigger Happy and making thresholds trigger a macro that sends the player to a different chat room. Is this too crazy? Or with some effort is it something I could set up?