44 lines
1.7 KiB
TypeScript
44 lines
1.7 KiB
TypeScript
// Module ID: 17606
|
|
// Function ID: 17607
|
|
// Name: ParticipantFocusManager
|
|
// Dependencies: [4913, 4906, 6613, 2]
|
|
|
|
// Module 17606 (ParticipantFocusManager)
|
|
import RTCConnectionStore from "RTCConnectionStore" /* 4913 */;
|
|
import ChannelRTCStore from "ChannelRTCStore" /* 4906 */;
|
|
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 6613 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
let map;
|
|
|
|
class ParticipantFocusManager extends AutomaticLifecycleManager {
|
|
constructor() {
|
|
const applyArgumentsResult = HermesBuiltin.applyArguments(this, new.target);
|
|
map = new Map();
|
|
applyArgumentsResult.stores = map.set(ChannelRTCStore, applyArgumentsResult.handleFocusParticipant);
|
|
return applyArgumentsResult;
|
|
}
|
|
handleFocusParticipant() {
|
|
const channelId = RTCConnectionStore.getChannelId();
|
|
const obj = RTCConnectionStore;
|
|
if (null != channelId) {
|
|
const selectedParticipantId = ChannelRTCStore.getSelectedParticipantId(channelId);
|
|
const videoParticipants = ChannelRTCStore.getVideoParticipants(channelId);
|
|
const rTCConnection = obj.getRTCConnection();
|
|
if (rTCConnection != null) {
|
|
const setSelectedParticipant = rTCConnection.setSelectedParticipant;
|
|
const found = videoParticipants.find((id) => id.id === closure_0 && !id.localVideoDisabled);
|
|
let id;
|
|
if (found != null) {
|
|
id = found.id;
|
|
}
|
|
const result = setSelectedParticipant(id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const prototype = ParticipantFocusManager.prototype;
|
|
const participantFocusManager = new ParticipantFocusManager();
|
|
let result = size.fileFinishedImporting("modules/calls/ParticipantFocusManager.tsx");
|
|
|
|
export default participantFocusManager;
|