How to exit and join a different meeting in the same browser instance

Hi, I am basically creating a game where people can move around and whenever they come close to each other, they can get into a conference call. The virtual world and the positions of it’s players are maintained through an external websocket API. For now, I am making sure that when the person gets in, he immediately joins a conference call, but I would like to change it so that they only get into conferences when they are close to each other, and when move far away again, they should get disconnected. I have this as my config options

const options = {
    hosts: {
        domain: '',
        muc: ''
    deploymentInfo: {
        shard: 'meet-jit-si-ap-mumbai-1-s31',

and when the connection is successful I basically make them join the conference as follows.

    room = connection.initJitsiConference('myroomName', confOptions);

How can I ensure that I can exit the meet and join a different meet ( since I am integrating this into a React application, therefore for now I have wrapped all of my stuff onto a hook, if needed I can make them join any given room name by passing it as a prop, but I have no idea how to change my meet once I am already in).

You can use the hangup command and send it over the API when you change rooms.

Thanks a lot, will look into it.