Close Connection - Javascript
Method​
- close - If you want to close connections with meeting,
connection.close
method is used. This method will not end the connected meetings.
Event​
- connection-close - Whenever connection is close between two rooms successfully, this event will trigger in both meeting participants and return
connectionId
.
// Get meeting B connection
const connection = meeting.connections.get("<meeting-B-id>");
// Close Connection with Meeting B
const onClick = () => {
connection.close();
};
// This event will be emitted to participants of both meetings.
meeting.on("connection-close", (connectionId) => {
console.log("ConnectionId", connectionId);
});
Got a Question? Ask us on discord