Fixes audio recording
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user