WebRTC does a good job of echo cancellation when the audio is coming from a remote peer. Is it also possible to cancel echo from a static video playing from my speakers?
For example, say I use a <video /> tag to play a static video by setting the src attribute. Then I play the audio through my speakers. If I capture my mic, it will pick up the audio from my speakers. If the audio was coming from a remote peer and not a static video, it would be echo cancelled. Is it possible to get echo cancellation on the static video as well?
It's possible by rendering a hidden/muted static video, calling captureStream(), creating a peer connection with myself, then playing the remote stream. But that's pretty ugly... Is there a cleaner way to tell WebRTC to echo cancel the audio?