decord/source/stores/VoiceChannelSettingsManager.tsx

74 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 16437
// Function ID: 16438
2026-07-29 08:29:29 +00:00
// Name: updateVoiceSettings
2026-08-05 07:35:12 +00:00
// Dependencies: [1218, 4324, 1372, 1931, 12974, 676, 709, 5214, 2]
2026-07-23 10:11:24 +00:00
2026-08-05 07:35:12 +00:00
// Module 16437 (updateVoiceSettings)
2026-07-29 08:29:29 +00:00
import fetchFingerprint from "fetchFingerprint";
import bitrate from "bitrate";
import ensureGuildLoaded from "ensureGuildLoaded";
import handleConnectionOpen from "handleConnectionOpen";
import mode from "mode";
2026-07-23 10:11:24 +00:00
import { VideoQualityMode } from "ME";
2026-07-29 08:29:29 +00:00
import "initialize";
2026-07-20 16:05:17 +00:00
function updateVoiceSettings() {
2026-07-29 08:29:29 +00:00
let obj = store2;
2026-07-20 16:05:17 +00:00
const voiceChannelId = store2.getVoiceChannelId();
if (null != voiceChannelId) {
const channel = store.getChannel(voiceChannelId);
if (tmp5) {
2026-07-29 08:29:29 +00:00
obj = { type: "SET_CHANNEL_BITRATE", bitrate: null };
obj[1] = channel.bitrate;
importDefault(709).dispatch(obj);
const obj2 = importDefault(709);
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
}
2026-07-29 08:29:29 +00:00
const voiceChannelId1 = obj.getVoiceChannelId();
2026-07-20 16:05:17 +00:00
if (null != voiceChannelId1) {
const channel1 = store.getChannel(voiceChannelId1);
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) {
2026-07-29 08:29:29 +00:00
obj = { type: "SET_CHANNEL_VIDEO_QUALITY_MODE", mode: null };
obj[1] = AUTO;
importDefault(709).dispatch(obj);
const obj4 = importDefault(709);
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-29 08:29:29 +00:00
function handleChannelUpdates(arg0) {
while (tmp !== undefined) {
let tmp3 = store2;
if (store2.getVoiceChannelId() === tmp2.id) {
let tmp4 = updateVoiceSettings;
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) {
callback();
2026-07-20 16:05:17 +00:00
}
});
}
2026-07-29 08:29:29 +00:00
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");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default prototype;