Use a default waveform when recording to ease component pop-in

Fixes https://github.com/vector-im/element-web/issues/18225
pull/21833/head
Travis Ralston 2021-08-03 13:26:27 -06:00
parent 8c5cfe6c2a
commit 32442068cf
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ limitations under the License.
import React from "react"; import React from "react";
import { IRecordingUpdate, RECORDING_PLAYBACK_SAMPLES, VoiceRecording } from "../../../audio/VoiceRecording"; import { IRecordingUpdate, RECORDING_PLAYBACK_SAMPLES, VoiceRecording } from "../../../audio/VoiceRecording";
import { replaceableComponent } from "../../../utils/replaceableComponent"; import { replaceableComponent } from "../../../utils/replaceableComponent";
import { arrayFastResample } from "../../../utils/arrays"; import { arrayFastResample, arraySeed } from "../../../utils/arrays";
import { percentageOf } from "../../../utils/numbers"; import { percentageOf } from "../../../utils/numbers";
import Waveform from "./Waveform"; import Waveform from "./Waveform";
import { MarkedExecution } from "../../../utils/MarkedExecution"; import { MarkedExecution } from "../../../utils/MarkedExecution";
@ -48,7 +48,7 @@ export default class LiveRecordingWaveform extends React.PureComponent<IProps, I
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
waveform: [], waveform: arraySeed(0, RECORDING_PLAYBACK_SAMPLES),
}; };
} }