Bug 180777
| Summary: | getUserMedia errors have incorrect name property | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Aiham Hammami <aiham> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | adam, ahmad.saleem792, ap, bfulgham, eric.carlson, oscar, rniwa, simon.fraser, youennf |
| Priority: | P2 | Keywords: | BrowserCompat |
| Version: | Safari Technology Preview | ||
| Hardware: | Mac | ||
| OS: | macOS 10.12 | ||
Aiham Hammami
Steps:
1. Run: navigator.mediaDevices.getUserMedia({ video: { width: { exact: 123123123 } } }).catch(err => console.error(err.name))
Expected:
- "OverconstrainedError" is logged to console (based on https://www.w3.org/TR/mediacapture-streams/#overconstrainederror.prototype.name)
Actual
- "Error" is logged to console.
This works as expected in Firefox 57 and Chrome 64.
Currently to determine if its an OverconstrainedError you have to use `err instanceof window.OverconstrainedError` or `Object.prototype.toString.call(err)` which are suboptimal and non-standard.
This probably also applies to other types of errors returned by getUserMedia but I haven't confirmed them.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I am unable to reproduce this error in Safari Technology Preview 152 on macOS 12.5.1 and when running from Console, it shows:
OverconstrainedError - which is expected result.
I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Please reopen, if you think this is still an issue. Thanks!