Demo: constraints ERROR
See original GitHub issueSince last chrome update demo page is not working. On select Audio input there is message:
Could not get audio media device: TypeError: Failed to execute ‘getUserMedia’ on ‘MediaDevices’: Malformed constraint: Cannot use both optional/mandatory and specific or advanced constraints.
Some changes make working in chrome:
if (navigator.webkitGetUserMedia !== undefined) {
constraint = {
video: false,
audio: {
optional: [
{sourceId:deviceId},
{googAutoGainControl: false},
{googAutoGainControl2: false},
{echoCancellation: false},
{googEchoCancellation: false},
{googEchoCancellation2: false},
{googDAEchoCancellation: false},
{googNoiseSuppression: false},
{googNoiseSuppression2: false},
{googHighpassFilter: false},
{googTypingNoiseDetection: false},
{googAudioMirroring: false}
]
}
}
}
else if (navigator.mozGetUserMedia !== undefined) {
constraint = {
video: false,
audio: {
deviceId: deviceId ? { exact: deviceId } : void 0,
echoCancellation: false,
mozAutoGainControl: false
//mozNoiseSuppression: false
}
}
}
else {
constraint = {
video: false,
audio: {
deviceId: deviceId ? {exact: deviceId} : void 0,
echoCancellation: false
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Developers - Demo: constraints ERROR - - Bountysource
Demo : constraints ERROR ... Since last chrome update demo page is not working. On select Audio input there is message: Could not...
Read more >ios - Constraints error <Will attempt to recover by breaking constraint ...
I am added the autolayout constraints to this cell...but it gives me lots of breaking constraints error....Then I decided to go step by...
Read more >How fix "Field(s) `date_stop` failed against a constraint - Odoo
Problem is when I try to install account module with demo data (I created database with ... Field(s) `date_stop` failed against a constraint:...
Read more >SSIS 2016 Session Precedence Constraints, Error Trapping - Hands ...
Reviews Precedence Constraints and briefly Trapping Errors. ... SSIS 2016 Session Precedence Constraints, Error Trapping - Hands On Easy Demo!
Read more >Capabilities, constraints, and settings - Web APIs | MDN
If an error occurs applying either set of constraints, handleError() is used to output a message into the log. document.getElementById(" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interestingly, one of the older demo pages does not encounter this problem:
https://boo-higuma.ssl-lolipop.jp/gh-pages/web-audio-recorder-js/
The old link uses the old deprecated getUserMedia API. Don’t use it.