mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-26 11:38:37 +00:00
Cap recording length, and warn at 10s remaining
See diff for details. Note that this introduces an "Uploading" state which is not currently used. At the moment, if a user hits the maximum time then their recording will be broken. This is expected to be fixed in a future PR.
This commit is contained in:
@@ -73,9 +73,7 @@ export class VoiceRecordingStore extends AsyncStoreWithClient<IState> {
|
||||
*/
|
||||
public disposeRecording(): Promise<void> {
|
||||
if (this.state.recording) {
|
||||
// Stop for good measure, but completely async because we're not concerned with this
|
||||
// passing or failing.
|
||||
this.state.recording.stop().catch(e => console.error("Error stopping recording", e));
|
||||
this.state.recording.destroy(); // stops internally
|
||||
}
|
||||
return this.updateState({recording: null});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user