This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
// Metro module 16299 (f16300).
import RTCConnectionStore from "../../stores/RTCConnectionStore";
import ChannelRTCStore from "./ChannelRTCStore";
import AutomaticLifecycleManager from "../../lib/AutomaticLifecycleManager";
class ParticipantFocusManager extends AutomaticLifecycleManager {
stores = new Map().set(ChannelRTCStore, this.handleFocusParticipant);
handleFocusParticipant() {
const channelId = RTCConnectionStore.getChannelId();
if (channelId != null) {
const selectedParticipantId = ChannelRTCStore.getSelectedParticipantId(channelId);
const videoParticipants = ChannelRTCStore.getVideoParticipants(channelId);
const rTCConnection = RTCConnectionStore.getRTCConnection();
if (rTCConnection != null) {
rTCConnection.setSelectedParticipant(videoParticipants.find((videoParticipant) => videoParticipant.id === selectedParticipantId && !videoParticipant.localVideoDisabled)?.id);
}
}
}
}
const participantFocusManager = new ParticipantFocusManager();
export default participantFocusManager;