Skip to content

Support multiple echoCancellation modes #1035

@guidou

Description

@guidou

The proposal here is allow multiple echo cancellation modes to better support certain use cases.

Possible values:

  • private: The implementation tries to cancel every possible source of audio. This is useful, for example, to make sure audio from a screen reader or any other applications is removed from the microphone track.
  • remote-only: In this case only audio coming from remote peerconnections is cancelled. The use case here is something like music lessons, where the student plays an instrument together with some accompaniment played by the UA or some other application. In this case, the application wants to remove the audio from the teacher (which comes via a peerconnection), but not audio from the accompaniment.
  • default or true: The UA decides what to cancel. Equivalent to the current value of true for echoCancellation.
  • off or false: echo cancellation disabled.

There are different ways to implement this.

One way would be to change the property to be of type (boolean or DOMString). It can take one of the above values (true, false, "private", and "remote-only").

The advantage of this approach is that we reuse an existing property and existing applications will work without modification.
A potential disadvantage is that a library that processes echoCancellation values will not be forward compatible with new applications that use the new values, but I don't think this is a common case.

An alternative approach is to introduce a new echoCancellationMode constrainable property of type DOMString, in addition to the existing echoCancellation property.

The advantage in this case is that everything using echoCancellation is backwards and forward compatible.
The disadvantage is that we would have one property that is a superset of an existing property, which adds complexity and potential confusion. Eventually we'll probably want to deprecate and remove the old one.

Other approaches are also possible.

cc @alvestrand @jan-ivar @youennf

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions