Closed bc-lee closed 1 month ago
I assume this only happens if one manually sets the video constraints to cause an overconstrained error.
Can you revert to using errorMsg and (for consistency) prefix with the error name in addition to the somewhat helpful error message?
I assume this only happens if one manually sets the video constraints to cause an overconstrained error.
I encountered this issue without modifying the constraints. I was testing Linux WebKitGTK to see if media capture streams (and WebRTC) were working. Its implementation seems to be buggy, as I got an OverconstrainedError when trying to get the video stream, even though I didn't set any constraints.
Thank you! Maybe @philn knows more about what WebKitGTK might be doing in wrong ways, it did show this code was wrong which is 👍
That demo works just fine in my development build.
Description
Currently, when some errors occur in the getusermedia/gum demo, the error message isn't handled correctly because the constraints object might not have required properties in some cases. This patch fixes the error message handling by using the error object directly and dumping it as a JSON string.
Purpose