I have a web application using opentokjs. In this application, while being in a one-to-one visioconference we play some custom sound buffers using audio web API.
Doing so an horrible acoustic feedback sometimes happen.
In the following I will call "local" the user getting the acoustic feedback and "remote" the other.
I did the following tests: - disable the mic and speakers of remote => feedback still happens - disable the mic of local => feedback is stopped
From those tests I deduced that a local loop exists somewhere meaning that the local opentok publisher emits on the local subscriber.
Is there a way to stop this local loop ? Should I activate some kind of echo cancellation on my web audio buffers and how ?
After some digging I decided to use OT.audioContext instead of window.AudioContext to build my web-audio nodes and linked them to OT.audioContext.destination and it did work.
Sadly the OT.audioContext is not described in the documentation so It may change in the future but for now, it is working