Fixes audio recording
This commit is contained in:
parent
10b0ec12a1
commit
28a295d4e1
4 changed files with 4 additions and 7 deletions
|
@ -157,5 +157,3 @@ export class WebAudioRecorder {
|
|||
this.onError(this, `WebAudioRecorder.js: ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
window.WebAudioRecorder = WebAudioRecorder;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright 2016 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { requestMicrophonePermissions } from '../util/requestMicrophonePermissions';
|
||||
import * as log from '../logging/log';
|
||||
import type { WebAudioRecorder } from '../WebAudioRecorder';
|
||||
import * as Errors from '../types/errors';
|
||||
import { requestMicrophonePermissions } from '../util/requestMicrophonePermissions';
|
||||
import { WebAudioRecorder } from '../WebAudioRecorder';
|
||||
|
||||
export class RecorderClass {
|
||||
private context?: AudioContext;
|
||||
|
@ -58,7 +58,7 @@ export class RecorderClass {
|
|||
this.context = new AudioContext();
|
||||
this.input = this.context.createGain();
|
||||
|
||||
this.recorder = new window.WebAudioRecorder(
|
||||
this.recorder = new WebAudioRecorder(
|
||||
this.input,
|
||||
{
|
||||
timeLimit: 60 + 3600, // one minute more than our UI-imposed limit
|
||||
|
|
|
@ -116,6 +116,7 @@ function startRecording(
|
|||
});
|
||||
}
|
||||
} catch (err) {
|
||||
log.error('AudioRecorder/ERROR_RECORDING', err);
|
||||
dispatch({
|
||||
type: ERROR_RECORDING,
|
||||
payload: ErrorDialogAudioRecorderType.ErrorRecording,
|
||||
|
|
2
ts/window.d.ts
vendored
2
ts/window.d.ts
vendored
|
@ -55,7 +55,6 @@ import type { IPCEventsType } from './util/createIPCEvents';
|
|||
import type { SignalContextType } from './windows/context';
|
||||
import type * as Message2 from './types/Message2';
|
||||
import type { initializeMigrations } from './signal';
|
||||
import type { WebAudioRecorder } from './WebAudioRecorder';
|
||||
|
||||
export { Long } from 'long';
|
||||
|
||||
|
@ -205,7 +204,6 @@ declare global {
|
|||
MessageController: MessageController;
|
||||
SignalProtocolStore: typeof SignalProtocolStore;
|
||||
WebAPI: WebAPIConnectType;
|
||||
WebAudioRecorder: typeof WebAudioRecorder;
|
||||
Whisper: WhisperType;
|
||||
getSignalProtocolStore: () => SignalProtocolStore;
|
||||
i18n: LocalizerType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue