Add simple play/pause controls

This commit is contained in:
Travis Ralston 2021-04-26 20:48:24 -06:00
parent e079f64a16
commit 30e120284d
9 changed files with 263 additions and 0 deletions

View file

@ -27,6 +27,7 @@ import LiveRecordingClock from "../voice_messages/LiveRecordingClock";
import {VoiceRecordingStore} from "../../../stores/VoiceRecordingStore";
import {UPDATE_EVENT} from "../../../stores/AsyncStore";
import PlaybackWaveform from "../voice_messages/PlaybackWaveform";
import PlayPauseButton from "../voice_messages/PlayPauseButton";
interface IProps {
room: Room;
@ -131,7 +132,13 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
waveform = <PlaybackWaveform recorder={this.state.recorder} />;
}
let playPause = null;
if (this.state.recordingPhase === RecordingState.Ended) {
playPause = <PlayPauseButton recorder={this.state.recorder} />;
}
return <div className={classes}>
{playPause}
{clock}
{waveform}
</div>;