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:
parent
22219e0e80
commit
0677cf866c
4 changed files with 69 additions and 8 deletions
|
@ -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});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue