We have implemented Suzuki Kasami’s Mutual Exclusion algorithm’s as a way to prevent two or more people from talking over one another in a video call.
Try it out - https://zoomutex.herokuapp.com/
Please find the algorithm implemented in the following files
client/scripts/room.tsThis is the main function to create a room, connect and disconnect peers' audio and video. Room.ts makes use of Suzukasa.ts and token.ts to ensure Mutual Exclusion between peers.
client/Scripts/mutex.tsHolds the girth of the algorithm, it will makes use of token.ts for it’s data structures
client/scripts/token.tsData structures for the Suzuki Kasami algorithm
npm run dev:serverRun server in development mode
npm run dev:clientLive compile typescript files.