decord/alpha/source/stores/VoiceChannelSettingsManager.tsx

69 lines
2.5 KiB
TypeScript
Raw Normal View History

// Module ID: 17919
// Function ID: 17920
// Name: VoiceChannelSettingsManager
// Dependencies: [502, 14271, 2042, 2096, 14272, 1074, 573, 7365, 2]
2026-07-23 10:11:24 +00:00
// Module 17919 (VoiceChannelSettingsManager)
import DispatcherDefault from "Dispatcher" /* 573 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import BitRateStore from "BitRateStore" /* 14271 */;
import ChannelStore from "ChannelStore" /* 2042 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2096 */;
import VideoQualityModeStore from "VideoQualityModeStore" /* 14272 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7365 */;
2026-07-20 16:05:17 +00:00
function updateVoiceSettings() {
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
2026-07-20 16:05:17 +00:00
if (null != voiceChannelId) {
const channel = ChannelStore.getChannel(voiceChannelId);
2026-07-20 16:05:17 +00:00
if (tmp5) {
const obj3 = { type: "SET_CHANNEL_BITRATE", bitrate: channel.bitrate };
DispatcherDefault.dispatch(obj3);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmp5 = null != channel && tmp2 !== channel.bitrate;
2026-07-20 16:05:17 +00:00
}
const voiceChannelId1 = SelectedChannelStore.getVoiceChannelId();
2026-07-20 16:05:17 +00:00
if (null != voiceChannelId1) {
const channel1 = ChannelStore.getChannel(voiceChannelId1);
2026-07-20 16:05:17 +00:00
if (null != channel1) {
let AUTO = channel1.videoQualityMode;
2026-07-29 08:29:29 +00:00
if (AUTO == null) {
2026-07-20 16:05:17 +00:00
AUTO = VideoQualityMode.AUTO;
}
if (tmp10 !== AUTO) {
const obj5 = { type: "SET_CHANNEL_VIDEO_QUALITY_MODE", mode: AUTO };
DispatcherDefault.dispatch(obj5);
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-29 08:29:29 +00:00
function handleChannelUpdates(arg0) {
while (tmp !== undefined) {
if (SelectedChannelStore.getVoiceChannelId() === tmp2.id) {
2026-07-29 08:29:29 +00:00
let tmp5 = updateVoiceSettings();
}
continue;
2026-07-20 16:05:17 +00:00
}
}
function handleVoiceStateUpdates(voiceStates) {
voiceStates = voiceStates.voiceStates;
const item = voiceStates.forEach((sessionId) => {
2026-07-29 08:29:29 +00:00
if (sessionId.getSessionId() === sessionId.sessionId) {
updateVoiceSettings();
2026-07-20 16:05:17 +00:00
}
});
}
const VideoQualityMode = fn(1074).VideoQualityMode;
const prototype = function VoiceChannelSettingsManager() {
2026-07-29 08:29:29 +00:00
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = { CHANNEL_UPDATES: handleChannelUpdates, VOICE_STATE_UPDATES: handleVoiceStateUpdates };
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
}
const prototype1 = new prototype();
const size = fn(2);
const result = size.fileFinishedImporting("stores/VoiceChannelSettingsManager.tsx");
2026-07-20 16:05:17 +00:00
export default prototype1;