From ef647e3e3e0510b5b9423b95d5c474441d0d4b6b Mon Sep 17 00:00:00 2001 From: Chad Phillips Date: Thu, 26 Jul 2018 15:02:29 -0500 Subject: [PATCH] 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. --- html5/verto/js/src/jquery.FSRTC.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index c2ea803d0b..4bda993e46 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -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 {