55fb142c2f
The current code may have a bug. If users set the audio bit rate to a non-supported value, such as 1000, Firefox will display an error in the console, while Chrome will create the recorded audio file successfully, but it will have no sound. I tested this on Ubuntu 24.04. The minimum bit rate threshold varies depending on the audio format. During my tests with Firefox version 131.0.3, which uses the audio/Ogg format, I found that the minimum supported value is 24000. In Chrome 129.0.6668.70, which uses the audio/MP4 format, the minimum supported value is 2400. Due to these differences, I decided to change the input from a text field to a select field, offering options that support both Ogg and MP4 audio formats. The database conversion for the old value has been provided in the lib/db/upgrade.php. The script will find the closest match to the current data and update it accordingly.