Replace voice broadcast running with resumed (#9502)
This commit is contained in:
parent
238a2b77af
commit
625971acb5
11 changed files with 22 additions and 22 deletions
|
@ -105,15 +105,15 @@ export class VoiceBroadcastRecording
|
|||
public async resume(): Promise<void> {
|
||||
if (this.state !== VoiceBroadcastInfoState.Paused) return;
|
||||
|
||||
this.setState(VoiceBroadcastInfoState.Running);
|
||||
this.setState(VoiceBroadcastInfoState.Resumed);
|
||||
await this.getRecorder().start();
|
||||
await this.sendInfoStateEvent(VoiceBroadcastInfoState.Running);
|
||||
await this.sendInfoStateEvent(VoiceBroadcastInfoState.Resumed);
|
||||
}
|
||||
|
||||
public toggle = async (): Promise<void> => {
|
||||
if (this.getState() === VoiceBroadcastInfoState.Paused) return this.resume();
|
||||
|
||||
if ([VoiceBroadcastInfoState.Started, VoiceBroadcastInfoState.Running].includes(this.getState())) {
|
||||
if ([VoiceBroadcastInfoState.Started, VoiceBroadcastInfoState.Resumed].includes(this.getState())) {
|
||||
return this.pause();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue