fix: allow stop button to work during mobile voice recording
When recording on mobile, if the pointerup listener was lost (e.g., dragging off the button), there was no way to stop recording. Now the stop button's onClick handler works on mobile when recording is active, providing a fallback.
This commit is contained in:
1 file changed
+1
-1
@@ -1246,7 +1246,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
aria-label={showAudioRecorder ? 'Stop recording' : 'Record audio message'}
|
||||
aria-pressed={showAudioRecorder}
|
||||
onClick={() => {
|
||||
if (mobileOrTablet()) return;
|
||||
if (mobileOrTablet() && !showAudioRecorder) return;
|
||||
if (showAudioRecorder) {
|
||||
audioRecorderRef.current?.stop();
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user