decord/source/stores/VoiceChannelSettingsManager.tsx
2026-08-15 05:55:55 +00:00

73 lines
2.3 KiB
TypeScript

// Module ID: 16724
// Function ID: 16725
// Name: updateVoiceSettings
// Dependencies: [1218, 4537, 1391, 1979, 13103, 676, 709, 5038, 2]
// Module 16724 (updateVoiceSettings)
import fetchFingerprint from "fetchFingerprint";
import bitrate from "bitrate";
import ensureGuildLoaded from "ensureGuildLoaded";
import handleConnectionOpen from "handleConnectionOpen";
import mode from "mode";
import { VideoQualityMode } from "ME";
import "initialize";
function updateVoiceSettings() {
let obj = store2;
const voiceChannelId = store2.getVoiceChannelId();
if (null != voiceChannelId) {
const channel = store.getChannel(voiceChannelId);
if (tmp5) {
obj = { type: "SET_CHANNEL_BITRATE", bitrate: null };
obj[1] = channel.bitrate;
importDefault(709).dispatch(obj);
const obj2 = importDefault(709);
}
tmp5 = null != channel && tmp2 !== channel.bitrate;
}
const voiceChannelId1 = obj.getVoiceChannelId();
if (null != voiceChannelId1) {
const channel1 = store.getChannel(voiceChannelId1);
if (null != channel1) {
let AUTO = channel1.videoQualityMode;
if (AUTO == null) {
AUTO = VideoQualityMode.AUTO;
}
if (tmp10 !== AUTO) {
obj = { type: "SET_CHANNEL_VIDEO_QUALITY_MODE", mode: null };
obj[1] = AUTO;
importDefault(709).dispatch(obj);
const obj4 = importDefault(709);
}
}
}
}
function handleChannelUpdates(arg0) {
while (tmp !== undefined) {
let tmp3 = store2;
if (store2.getVoiceChannelId() === tmp2.id) {
let tmp4 = updateVoiceSettings;
let tmp5 = updateVoiceSettings();
}
continue;
}
}
function handleVoiceStateUpdates(voiceStates) {
voiceStates = voiceStates.voiceStates;
const item = voiceStates.forEach((sessionId) => {
if (sessionId.getSessionId() === sessionId.sessionId) {
callback();
}
});
}
let prototype = function VoiceChannelSettingsManager() {
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = { CHANNEL_UPDATES: handleChannelUpdates, VOICE_STATE_UPDATES: handleVoiceStateUpdates };
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
}
prototype = new prototype();
const result = require("ensureGuildLoaded").fileFinishedImporting("stores/VoiceChannelSettingsManager.tsx");
export default prototype;