Around the events in which the Start/Stop/Cancel Recording button changes, the current UI behavior makes clicking the button error-prone. In particular, the following could happen:
- At the end of a long trial that times out, a user clicks the button to "Stop" the recording, but the button has just changed to "Cancel Upload", and the user loses their data due to clicking "Cancel Upload"
- A user double clicks the "Start Recording" button, which inadvertently stops the recording
- A user stopping a recording will double click and inadvertently cancel the upload
A general fix would be to make the button unclickable for a few (~2-3) seconds any time its state changes (e.g., Stop -> Cancel, Start -> Stop, Cancel -> Start, etc.).