I'm working on a Google Chrome extensions that automatically mutes the microphone when somebody else is talking, to prevent speaking over each other.
I've started by looking at the Chrome tabs API and I can successfully detect a sound played on a tab through the onUpdate
event and the audible
property:
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
// Does stuff on changeInfo.audible changed
});
The problem is that this event does not fire on audio received from a tab with Google Meet. I'm assuming it's because the audio comes from WebRTC and so it's managed differently.
So I've tried this solution which proxies the WebRTC stream: Ways to capture incoming WebRTC video streams (client side)
The problem is that in this case it looks like the RTCPeerConnection is not built using my proxy.
Is there any way I can detect the incoming audio (another person speaking in the meeting) using a Chrome extension or some JavaScript?