JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Voice Recorder Widget fails on Chrome browser when more than 6 widgets were addedAsked by phonlab on November 04, 2016 at 05:15 PM
The voice recorder widget breaks on Chrome when there are 6 or more widgets in the form. Here is the output to the dev console:
Uncaught DOMException: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6).
at WebRecorder.initialize (https://data-widgets.jotform.io/voiceRecord/js/WebRecorder.js?v=1478292350:58:31)
at VoiceRecorder.init (https://data-widgets.jotform.io/voiceRecord/js/main-script.js?v=1478292350:63:10)
at Object.func (https://data-widgets.jotform.io/voiceRecord/js/main-script.js?v=1478292350:490:12)
at Object.a [as publish] (https://js.jotform.com/JotFormCustomWidget.min.js:1:5923)
at c (https://js.jotform.com/JotFormCustomWidget.min.js:1:3706)
It seems that a new AudioContext is being opened for each Widget. Either only one AudioContext should be opened per page, or the contexts should be closed after each use via AudioContext.close().
Firefox does not seem to limit AudioContexts, or at least has a higher limit, but obviously it would be best if both browsers were supported. As an aside, this user seems to have encountered the same issue: https://www.jotform.com/answers/919606-Voice-Recorder-widget-When-multiple-Voice-Recorder-widgets-are-added-to-the-form-some-of-them-will-work-and-some-will-not-work, but it looks like no one considered that multiple contexts could be the issue.
I understand that fixing this might not be simple, depending on how the widget is implemented. If something like adding a pause feature is more doable, that would solve our problem just as well, as it would allow participants in our experiment to take breaks. The main reason we need multiple recorders is to avoid participant fatigue when collecting speech data.
Thanks for your help.
I made a test form https://www.jotform.com/63088110054952 and I was able to reproduce the console error on Chrome as well.
I have now submitted a bug ticket report to the higher team support. We will notify you here once we have fixed the issue.
Thank you for reporting this to us.
Thank you for the prompt response!
If it's any help, it seems like sometimes some of the AudioContexts do get closed eventually (that, or there is some other problem, perhaps with the way they're being closed); for instance, a couple of people who tested the form found that the first few recorders would work, then one wouldn't, then a couple more would work, and then the rest wouldn't. Unfortunately, they did not note the output to the console, but I'd guess it's the same as before.
Thank you for providing more details. I have added these details on the ticket as well.
We've updated the widget to fix the multiple instance bug.
Please check your form and let us know.
I have tested it and the problem is not fixed yet
This widget seems to work fine on Firefox but is having issues on Chrome
Any idea when it will be fixed
this is the error
Could not access microphone: NotSupportedError: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6).
I tested in Chrome, as well as FireFox and did not receive this error. I checked a couple different forms and could no reproduce this. Here is one of the forms I tested with:
All the widgets load, no errors when recording.
Let us know which form is still showing the error and we will be happy to have a look.