mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
FS-11285: OverconstrainedError on some Android front cameras when frameRate.min is specified
As described at https://bugs.chromium.org/p/chromium/issues/detail?id=862325, some Android devices using Chrome fail a getUserMedia() request when frameRate.min is specified. This is due to a bug in both the device (reporting a 0 min frameRate), and Chrome, which fails to catch this and set a reasonable fallback value. While a fix has gone into Chrome, it might be awhile before this fix makes it into their stable release, so filing this with my quick hack to prevent the error on Android devices. Note this fix could certainly be more robust (maybe detect Chrome version, or some test to see if min frameRate from the device returns 0), and it gets the job done as a start.
This commit is contained in:
parent
d5af929660
commit
ef647e3e3e
@ -536,6 +536,11 @@
|
||||
mandatory: obj.options.videoParams,
|
||||
optional: opt
|
||||
};
|
||||
// NOTE: This is a workaround for
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=862325
|
||||
if (!!navigator.userAgent.match(/Android/i)) {
|
||||
delete video.frameRate.min;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user