Confirm listen to a broadcast while recording (#9831)

This commit is contained in:
Michael Weimann 2023-01-02 13:21:33 +01:00 committed by GitHub
parent 91e078d96b
commit 0f7a2ce6df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 213 additions and 29 deletions

View file

@ -17,7 +17,12 @@ limitations under the License.
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
import { VoiceBroadcastPlayback, VoiceBroadcastPlaybackEvent, VoiceBroadcastPlaybackState } from "..";
import {
VoiceBroadcastPlayback,
VoiceBroadcastPlaybackEvent,
VoiceBroadcastPlaybackState,
VoiceBroadcastRecordingsStore,
} from "..";
import { IDestroyable } from "../../utils/IDestroyable";
export enum VoiceBroadcastPlaybacksStoreEvent {
@ -42,7 +47,7 @@ export class VoiceBroadcastPlaybacksStore
/** Playbacks indexed by their info event id. */
private playbacks = new Map<string, VoiceBroadcastPlayback>();
public constructor() {
public constructor(private recordings: VoiceBroadcastRecordingsStore) {
super();
}
@ -69,7 +74,7 @@ export class VoiceBroadcastPlaybacksStore
const infoEventId = infoEvent.getId();
if (!this.playbacks.has(infoEventId)) {
this.addPlayback(new VoiceBroadcastPlayback(infoEvent, client));
this.addPlayback(new VoiceBroadcastPlayback(infoEvent, client, this.recordings));
}
return this.playbacks.get(infoEventId);