decord/alpha/source/modules/calls/ParticipantFocusManager.tsx

45 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 18094
// Function ID: 18095
// Name: ParticipantFocusManager
2026-10-09 10:00:15 +00:00
// Dependencies: [5109, 6043, 6804, 2]
2026-07-23 10:11:24 +00:00
2026-10-09 10:00:15 +00:00
// Module 18094 (ParticipantFocusManager)
import RTCConnectionStore from "RTCConnectionStore" /* 5109 */;
import ChannelRTCStore from "ChannelRTCStore" /* 6043 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 6804 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
let map;
class ParticipantFocusManager extends AutomaticLifecycleManager {
2026-07-29 08:29:29 +00:00
constructor() {
2026-10-03 08:58:59 +00:00
const applyArgumentsResult = HermesBuiltin.applyArguments(this, new.target);
2026-07-29 08:29:29 +00:00
map = new Map();
2026-10-03 08:58:59 +00:00
applyArgumentsResult.stores = map.set(ChannelRTCStore, applyArgumentsResult.handleFocusParticipant);
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
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);
2026-07-29 08:29:29 +00:00
}
}
}
2026-10-03 08:58:59 +00:00
}
const prototype = ParticipantFocusManager.prototype;
2026-07-29 08:29:29 +00:00
const participantFocusManager = new ParticipantFocusManager();
let result = size.fileFinishedImporting("modules/calls/ParticipantFocusManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default participantFocusManager;