Open Bug 1453013 Opened 6 years ago Updated 2 years ago

Get rid of MediaStreamError from getUserMedia and other MediaManager APIs

Categories

(Core :: WebRTC: Audio/Video, task, P3)

task

Tracking

()

Tracking Status
firefox61 --- affected

People

(Reporter: jib, Unassigned)

References

Details

(Keywords: site-compat)

The MediaCapture spec throws and rejects errors of three kinds: DOMException, TypeError and OverconstrainedError (its own creation) [1]  

To be fully spec-compliant we'd need to ditch our old-spec MediaStreamError [2] in favor of that.

Impact is minor, since JS already encourages looking at the error.name string rather than the error's instanceof (DOMException especially covers a swathe of errors), but the difference is JS observable.

[1] https://w3c.github.io/mediacapture-main/getusermedia.html#error-handling
[2] https://searchfox.org/mozilla-central/rev/b55e1a1cbcaee34878e133fbac20c4c2af6e11b5/dom/webidl/MediaStreamError.webidl#17
Keywords: site-compat
Type: enhancement → task
Depends on: 1213512

With w3c/mediacapture-main#746 MediaStreamError is gone from the spec, and OverconstrainedError defined as follows:

[Exposed=Window]
interface OverconstrainedError : DOMException {
  constructor(DOMString constraint, optional DOMString message = "");
  readonly attribute DOMString constraint;
};

This should let us proceed here.

Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.