RESOLVED CONFIGURATION CHANGED 180777
getUserMedia errors have incorrect name property
https://bugs.webkit.org/show_bug.cgi?id=180777
Summary getUserMedia errors have incorrect name property
Aiham Hammami
Reported 2017-12-13 15:59:39 PST
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
Ahmad Saleem
Comment 1 2022-08-29 03:28:05 PDT
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!
Note You need to log in before you can comment on or make changes to this bug.