decord/stable/source/stores/RTCConnectionStore.tsx

720 lines
22 KiB
TypeScript
Raw Permalink Normal View History

2026-10-06 22:12:49 +00:00
// Module ID: 4860
// Function ID: 4861
// Name: RTCConnectionStore
2026-10-06 22:12:49 +00:00
// Dependencies: [4854, 502, 4861, 1086, 4862, 3, 4864, 4891, 585, 13371, 2046, 4866, 5724, 13372, 504, 13374, 1253, 1987, 2]
2026-10-06 22:12:49 +00:00
// Module 4860 (RTCConnectionStore)
import LoggerDefault from "Logger" /* 3 */;
2026-10-06 22:12:49 +00:00
import get_initializedDefault from "get initialized" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 585 */;
import asyncRequire from "asyncRequire" /* 1987 */;
import Constants2 from "Constants" /* 4862 */;
import TimeUtils from "TimeUtils" /* 4866 */;
import VoiceStateAnalyticsDefault from "VoiceStateAnalytics" /* 13371 */;
import useSpatialAudioControlState from "useSpatialAudioControlState" /* 13372 */;
import trackVideoToggle from "trackVideoToggle" /* 13374 */;
import GameConsoleStore from "GameConsoleStore" /* 4854 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-06 22:12:49 +00:00
import SortedVoiceStateStore from "SortedVoiceStateStore" /* 4861 */;
import Constants from "Constants" /* 1086 */;
import size from "module_2" /* 2 */;
2026-10-06 22:12:49 +00:00
const require = globalThis.__r;
let _require, closure_18, closure_3, config, joinVoiceId, redux, voiceStateAnalytics;
let c10;
let c9;
let metroImportAll;
function createRTCConnection(guildId, channelId, createdTime) {
2026-10-06 22:12:49 +00:00
let _default;
if (null == sessionId) {
2026-10-06 22:12:49 +00:00
const tmp = globalThis;
const _Error = Error;
2026-10-06 22:12:49 +00:00
const self = this;
const self2 = this;
const error = new Error("Creating RTCConnection without session.");
throw error;
} else {
const id = AuthenticationStore.getId();
let obj = { userId: id, sessionId, guildId, channelId, joinVoiceId, createdTime };
2026-10-06 22:12:49 +00:00
const self3 = this;
const self4 = this;
_default = new _default(4864).default(obj);
_default.on(_default(4891).RTCConnectionEvent.State, (state, arg1, arg2) => {
let closure_1 = arg1;
let closure_2 = arg2;
let obj = closure_1(closure_2[8]);
obj.wait(() => {
const dispatch = DispatcherDefault.dispatch;
const obj = { type: "RTC_CONNECTION_STATE", state };
DispatcherDefault;
const merged = Object.assign(closure_1);
const merged1 = Object.assign(closure_2);
2026-10-06 22:12:49 +00:00
return dispatch(obj);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.Video, (guildId, channelId, userId, streamId, rtcServerId) => {
let obj = DispatcherDefault;
obj.wait(() => {
const obj = DispatcherDefault;
2026-10-06 22:12:49 +00:00
obj2 = { type: "RTC_CONNECTION_VIDEO", guildId, channelId, userId, streamId, rtcServerId, context: MediaEngineContextTypes.DEFAULT, mediaEngineConnectionId: _default.getMediaEngineConnectionId() };
return obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.Ping, (pings, quality) => {
let obj = quality(closure_2[8]);
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_PING", pings, quality };
return obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.OutboundLossRate, (lossRate) => {
let obj = closure_1(closure_2[8]);
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_LOSS_RATE", lossRate };
return obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.Speaking, (userId, speaking) => {
const obj = closure_17;
if (closure_17 != null) {
obj.setSpeaking(userId, speaking);
}
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.Flags, (userId, flags) => {
let obj = DispatcherDefault;
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_FLAGS", flags, userId, guildId: _default.guildId, channelId: _default.channelId, context: _default.context };
obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.UsersMerged, (userIds, context) => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_USERS_MERGED", userIds, context };
obj.dispatch(obj2);
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.ClientConnect, (userIds) => {
let obj = DispatcherDefault;
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_CLIENT_CONNECT", userIds, guildId: _default.guildId, channelId: _default.channelId, context: _default.context };
obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.ClientDisconnect, (userId) => {
let obj = DispatcherDefault;
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_CLIENT_DISCONNECT", userId, guildId: _default.guildId, channelId: _default.channelId, context: _default.context };
obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.Platform, (userId, platform, channelId) => {
let obj = platform(channelId[8]);
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_PLATFORM", platform, userId, channelId };
obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.SecureFramesUpdate, () => {
let obj = DispatcherDefault;
obj.wait(() => {
const obj = closure_1_1(closure_1_2[8]);
obj.dispatch({ type: "RTC_CONNECTION_SECURE_FRAMES_UPDATE" });
});
});
2026-10-06 22:12:49 +00:00
_default.on(_default(4891).RTCConnectionEvent.RosterMapUpdate, (userIds) => {
let obj = closure_1(closure_2[8]);
obj.wait(() => {
const obj = DispatcherDefault;
obj2 = { type: "RTC_CONNECTION_ROSTER_MAP_UPDATE", userIds };
obj.dispatch(obj2);
});
});
2026-10-06 22:12:49 +00:00
const self5 = this;
const self6 = this;
const tmp28 = VoiceStateAnalyticsDefault;
let closure_17 = new tmp28(AuthenticationStore.getId(), channelId);
let c15 = null;
let c18 = false;
let c19 = false;
const tmp282 = new tmp28(AuthenticationStore.getId(), channelId);
return _default;
}
}
function destroyRTCConnection(arg0) {
2026-10-06 22:12:49 +00:00
let mediaSessionId;
let flag = arg0;
if (arg0 === undefined) {
flag = true;
}
if (null == redux) {
return false;
} else {
2026-10-06 22:12:49 +00:00
({ duration: redux.getDuration(), mediaSessionId, rtcConnectionId: redux.getRTCConnectionId(), wasEverMultiParticipant, wasEverRtcConnected, voiceStateAnalytics, channelId: redux.channelId });
mediaSessionId = redux.getMediaSessionId();
if (mediaSessionId == null) {
mediaSessionId = null;
}
2026-10-06 22:12:49 +00:00
const obj = { type: "MEDIA_ENGINE_CONNECTION_STATS_HISTORY_RESET", mediaEngineConnectionId: redux.getMediaEngineConnectionId() };
const dispatch = DispatcherDefault.dispatch;
DispatcherDefault;
dispatch(obj);
redux.destroy();
redux = null;
voiceStateAnalytics = null;
c22 = false;
if (flag) {
closure_20 = null;
}
}
}
function handleClearRemoteDisconnectVoiceChannelId() {
c14 = null;
}
function handleChannelDelete(arg0) {
if (null != redux) {
if (redux.channelId === tmp.id) {
destroyRTCConnection();
}
}
return false;
}
function handleRtcAction() {
return true;
}
2026-10-06 22:12:49 +00:00
({ RTCConnectionStates: metroImportAll, AppStates: c9, RTCConnectionQuality: c10 } = Constants);
const MediaEngineContextTypes = Constants2.MediaEngineContextTypes;
let tmp3 = new LoggerDefault("RTCConnectionStore");
let closure_12 = tmp3;
let closure_13 = [];
let c14 = null;
2026-10-06 22:12:49 +00:00
let obj2 = null;
let c16 = null;
let c17 = null;
const wasEverMultiParticipant = false;
let c19 = false;
let closure_20 = null;
let closure_21 = null;
let c22 = false;
let c23 = null;
let c24 = null;
2026-10-06 22:12:49 +00:00
const Store = get_initializedDefault.Store;
class RTCConnectionStore extends Store {
2026-10-06 22:12:49 +00:00
initialize() {
this.waitFor(AuthenticationStore, GameConsoleStore, SortedVoiceStateStore);
const obj = trackVideoToggle;
const result = obj.setVideoToggleAnalyticsParams(this.getRTCConnectionId, this.getMediaSessionId);
}
2026-10-06 22:12:49 +00:00
getRTCConnection() {
return redux;
}
2026-10-06 22:12:49 +00:00
getState() {
let DISCONNECTED;
if (null != redux) {
DISCONNECTED = redux.state;
} else {
DISCONNECTED = metroImportAll.DISCONNECTED;
}
2026-10-06 22:12:49 +00:00
return DISCONNECTED;
}
2026-10-06 22:12:49 +00:00
isConnected() {
return this.getState() === metroImportAll.RTC_CONNECTED;
}
2026-10-06 22:12:49 +00:00
isDisconnected() {
return this.getState() === metroImportAll.DISCONNECTED;
}
2026-10-06 22:12:49 +00:00
getRemoteDisconnectVoiceChannelId() {
return c14;
}
2026-10-06 22:12:49 +00:00
getLastSessionVoiceChannelId() {
return c16;
}
2026-10-06 22:12:49 +00:00
setLastSessionVoiceChannelId(arg0) {
c16 = arg0;
}
2026-10-06 22:12:49 +00:00
getGuildId() {
let guildId;
if (redux != null) {
guildId = redux.guildId;
}
2026-10-06 22:12:49 +00:00
return guildId;
}
2026-10-06 22:12:49 +00:00
getChannelId() {
let channelId;
if (redux != null) {
channelId = redux.channelId;
}
2026-10-06 22:12:49 +00:00
return channelId;
}
getHostname() {
let str = "";
if (null != redux) {
str = redux.hostname;
}
2026-10-06 22:12:49 +00:00
return str;
}
getQuality() {
let UNKNOWN;
if (null != redux) {
UNKNOWN = redux.quality;
} else {
UNKNOWN = constants3.UNKNOWN;
}
2026-10-06 22:12:49 +00:00
return UNKNOWN;
}
getPings() {
let pings;
if (null != redux) {
pings = redux.getPings();
} else {
pings = closure_13;
}
2026-10-06 22:12:49 +00:00
return pings;
}
getAveragePing() {
let num = 0;
if (null != redux) {
let averagePing;
const obj = redux;
if (redux != null) {
averagePing = obj.getAveragePing();
}
2026-10-06 22:12:49 +00:00
num = averagePing;
}
2026-10-06 22:12:49 +00:00
return num;
}
getLastPing() {
let lastPing;
const obj = redux;
if (redux != null) {
lastPing = obj.getLastPing();
}
2026-10-06 22:12:49 +00:00
return lastPing;
}
getOutboundLossRate() {
let outboundLossRate;
const obj = redux;
if (redux != null) {
outboundLossRate = obj.getOutboundLossRate();
}
2026-10-06 22:12:49 +00:00
return outboundLossRate;
}
getMediaSessionId() {
let mediaSessionId;
const obj = redux;
if (redux != null) {
mediaSessionId = obj.getMediaSessionId();
}
2026-10-06 22:12:49 +00:00
return mediaSessionId;
}
getRTCConnectionId() {
let rTCConnectionId;
const obj = redux;
if (redux != null) {
rTCConnectionId = obj.getRTCConnectionId();
}
2026-10-06 22:12:49 +00:00
return rTCConnectionId;
}
getDuration() {
let duration;
const obj = redux;
if (redux != null) {
duration = obj.getDuration();
}
if (duration == null) {
let duration1;
if (obj2 != null) {
duration1 = obj2.duration;
}
duration = duration1;
}
2026-10-06 22:12:49 +00:00
return duration;
}
getLastRTCConnectionState() {
return obj2;
}
getPacketStats() {
let packetStats;
const obj = redux;
if (redux != null) {
packetStats = obj.getPacketStats();
}
2026-10-06 22:12:49 +00:00
return packetStats;
}
getVoiceStateStats() {
let stats;
const obj = c17;
if (c17 != null) {
stats = obj.getStats();
}
2026-10-06 22:12:49 +00:00
return stats;
}
getUserVoiceSettingsStats(arg0) {
let userVoiceSettingsStats;
const obj = c17;
if (c17 != null) {
userVoiceSettingsStats = obj.getUserVoiceSettingsStats(arg0);
}
2026-10-06 22:12:49 +00:00
return userVoiceSettingsStats;
}
getWasEverMultiParticipant() {
return wasEverMultiParticipant;
}
getWasEverRtcConnected() {
return c19;
}
getUserIds() {
let userIds;
const obj = redux;
if (redux != null) {
userIds = obj.getUserIds();
}
2026-10-06 22:12:49 +00:00
return userIds;
}
getJoinVoiceId() {
return c23;
}
isUserConnected(arg0) {
let isUserConnected;
const obj = redux;
if (redux != null) {
isUserConnected = obj.getIsUserConnected(arg0);
}
2026-10-06 22:12:49 +00:00
return isUserConnected;
}
getSecureFramesState() {
let secureFramesState;
const obj = redux;
if (redux != null) {
secureFramesState = obj.getSecureFramesState();
}
2026-10-06 22:12:49 +00:00
return secureFramesState;
}
getSecureFramesRosterMapEntry(arg0) {
let secureFramesRosterMap;
const obj = redux;
if (redux != null) {
secureFramesRosterMap = obj.getSecureFramesRosterMap();
}
2026-10-06 22:12:49 +00:00
let value;
if (secureFramesRosterMap != null) {
value = secureFramesRosterMap.get(arg0);
}
2026-10-06 22:12:49 +00:00
return value;
}
2026-10-06 22:12:49 +00:00
getLastNonZeroRemoteVideoSinkWantsTime() {
return closure_21;
}
getWasMoved() {
return c22;
}
}
const prototype = RTCConnectionStore.prototype;
RTCConnectionStore.displayName = "RTCConnectionStore";
let obj = {
CONNECTION_OPEN: function handleConnectionOpen(sessionId) {
sessionId = sessionId.sessionId;
c14 = null;
c16 = null;
destroyRTCConnection(false);
2026-10-06 22:12:49 +00:00
if (null != config) {
const timeout = config.timeout;
timeout.stop();
2026-10-06 22:12:49 +00:00
config = null;
}
return false;
},
CONNECTION_CLOSED: function handleConnectionClosed() {
2026-10-06 22:12:49 +00:00
let c4 = null;
c14 = null;
c16 = null;
destroyRTCConnection(false);
2026-10-06 22:12:49 +00:00
if (null != config) {
const timeout = config.timeout;
timeout.stop();
2026-10-06 22:12:49 +00:00
config = null;
}
},
LOGOUT: function handleLogout() {
closure_20 = null;
return false;
},
RTC_CONNECTION_STATE: function handleRTCConnectionState(state) {
2026-10-06 22:12:49 +00:00
if (state.state === metroImportAll.RTC_CONNECTED) {
let c19 = true;
if (null != redux) {
const obj = TimeUtils;
closure_20 = obj.now();
}
}
return true;
},
RTC_CONNECTION_PING: function handleRtcConnectionPing() {
2026-10-06 22:12:49 +00:00
if (null != redux) {
const obj = TimeUtils;
closure_20 = obj.now();
}
return true;
},
RTC_CONNECTION_LOSS_RATE: handleRtcAction,
RTC_CONNECTION_UPDATE_ID: function handleRtcConnectionUpdateId(connection) {
2026-10-06 22:12:49 +00:00
return connection.connection === redux;
},
RTC_CONNECTION_SECURE_FRAMES_UPDATE: handleRtcAction,
RTC_CONNECTION_CLIENT_CONNECT: handleRtcAction,
RTC_CONNECTION_CLIENT_DISCONNECT: handleRtcAction,
RTC_CONNECTION_REMOTE_VIDEO_SINK_WANTS: function handleRtcConnectionRemoteVideoSinkWants(context) {
let tmp2 = context.context === MediaEngineContextTypes.DEFAULT;
if (tmp2) {
2026-10-06 22:12:49 +00:00
const tmp3 = globalThis;
const _Object = Object;
const entries = Object.entries(tmp);
const someResult = entries.some((item) => {
2026-10-06 22:12:49 +00:00
let tmp;
let tmp2;
[tmp, tmp2] = item;
2026-10-06 22:12:49 +00:00
return "any" !== tmp && 0 !== tmp2;
});
if (someResult) {
const _performance = performance;
closure_21 = performance.now();
}
tmp2 = someResult;
}
return tmp2;
},
VIDEO_SIZE_UPDATE: function handleVideoSizeUpdate(arg0) {
2026-10-06 22:12:49 +00:00
const obj = redux;
if (redux != null) {
obj.setVideoSize(tmp, tmp2, tmp3);
}
},
VOICE_STATE_UPDATES: function handleVoiceStateUpdates(arg0) {
2026-10-06 22:12:49 +00:00
let require;
let voiceStates;
({ voiceStates, receivedAt: require } = arg0);
return voiceStates.reduce((acc, userId) => {
2026-10-06 22:12:49 +00:00
const obj = c17;
if (c17 != null) {
obj.updateVoiceStates(userId.userId, userId.channelId);
}
let tmp2 = closure_18;
2026-10-06 22:12:49 +00:00
if (!tmp2) {
let num;
2026-10-06 22:12:49 +00:00
obj2 = c17;
if (c17 != null) {
num = obj2.getStats().max_voice_state_count;
}
if (num == null) {
num = 0;
}
tmp2 = num > 1;
}
closure_18 = tmp2;
if (AuthenticationStore.getId() !== userId.userId) {
return acc;
} else {
2026-10-06 22:12:49 +00:00
if (null != config && userId.channelId === config.channelId) {
if (null != config) {
const timeout = config.timeout;
timeout.stop();
config = null;
}
}
if (null != closure_3) {
if (userId.sessionId === c4) {
if (null == userId.guildId) {
2026-10-06 22:12:49 +00:00
const tmp26 = userId.guildId !== closure_3.guildId && null == userId.channelId;
if (!tmp26) {
destroyRTCConnection();
}
if (null != userId.channelId) {
let channelId = null;
c16 = null;
closure_3 = createRTCConnection(userId.guildId, userId.channelId, _require);
let num9;
2026-10-06 22:12:49 +00:00
const obj7 = c17;
if (c17 != null) {
num9 = obj7.getStats().max_voice_state_count;
}
if (num9 == null) {
num9 = 0;
}
closure_18 = num9 > 1;
}
}
if (null == userId.channelId) {
destroyRTCConnection();
} else {
closure_3.setNextChannelId(userId.channelId);
c22 = true;
2026-10-06 22:12:49 +00:00
let c23 = null;
closure_3.clearJoinVoiceId();
}
} else if (userId.guildId === closure_3.guildId) {
2026-10-06 22:12:49 +00:00
const tmp19 = null != GameConsoleStore.getAwaitingRemoteSessionInfo() && null != GameConsoleStore.getRemoteSessionId();
if (!tmp19) {
channelId = closure_3.channelId;
}
destroyRTCConnection();
}
} else {
if (userId.sessionId === c4) {
if (null != userId.channelId) {
2026-10-06 22:12:49 +00:00
if (!(null != config && userId.channelId === config.channelId)) {
if (null != closure_20) {
2026-10-06 22:12:49 +00:00
const obj3 = TimeUtils;
if (obj3.now() - closure_20 >= 300000) {
2026-10-06 22:12:49 +00:00
const obj4 = DispatcherDefault;
obj4.wait(() => {
const _default = closure_1_0(closure_1_2[12]).default;
return _default.disconnect();
});
return acc;
}
}
}
channelId = null;
c16 = null;
closure_3 = createRTCConnection(userId.guildId, userId.channelId, _require);
let num5;
2026-10-06 22:12:49 +00:00
const obj5 = c17;
if (c17 != null) {
num5 = obj5.getStats().max_voice_state_count;
}
if (num5 == null) {
num5 = 0;
}
closure_18 = num5 > 1;
}
}
return acc;
}
return true;
}
}, false);
},
VOICE_CHANNEL_SELECT: function handleVoiceChannelSelect(channelId) {
2026-10-06 22:12:49 +00:00
let logger;
let obj;
let tmp = null == redux;
if (!tmp) {
2026-10-06 22:12:49 +00:00
tmp = null != channelId.channelId && redux.channelId === channelId.channelId;
const tmp2 = null != channelId.channelId && redux.channelId === channelId.channelId;
}
if (!tmp) {
destroyRTCConnection();
}
joinVoiceId = channelId.joinVoiceId;
_require = channelId;
if (null != obj) {
const timeout = obj.timeout;
timeout.stop();
obj = null;
}
if (null != channelId.channelId) {
2026-10-06 22:12:49 +00:00
const self = this;
const self2 = this;
const timeout1 = new require("Timers").Timeout();
timeout1.start(30000, () => {
2026-10-06 22:12:49 +00:00
obj = { joinVoiceId: channelId.joinVoiceId, channelId: channelId.channelId, guildId: channelId.guildId };
logger.warn("No VOICE_STATE_UPDATE received within 30000ms of VOICE_CHANNEL_SELECT", obj);
let c24 = null;
});
2026-10-06 22:12:49 +00:00
obj = { joinVoiceId: null, channelId: null, guildId: null, timeout: timeout1 };
({ joinVoiceId: obj2.joinVoiceId, channelId: obj2.channelId, guildId: obj2.guildId } = channelId);
}
},
AUDIO_SET_NOISE_CANCELLATION: function handleAudioSetNoiseCancellation(enabled) {
2026-10-06 22:12:49 +00:00
const obj = redux;
if (redux != null) {
const result = obj.setNoiseCancellationEnabled(enabled.enabled);
}
},
AUDIO_SET_AUDIO_MIXER_SETTINGS: function handleAudioSetAudioMixerSettings(context) {
if (context.context !== MediaEngineContextTypes.DEFAULT) {
return false;
} else {
let flag = context.settings.enabled;
if (flag == null) {
flag = false;
}
if (flag) {
2026-10-06 22:12:49 +00:00
const obj = useSpatialAudioControlState;
flag = obj.isSpatialAudioEligible("RTCConnectionStore");
}
2026-10-06 22:12:49 +00:00
obj2 = redux;
if (redux != null) {
const result = obj2.setSpatialAudioEnabled(flag);
}
}
},
VOICE_SERVER_UPDATE: function handleVoiceServerUpdate(guildId) {
let tmp = null != redux;
if (tmp) {
2026-10-06 22:12:49 +00:00
let tmp3 = null == guildId.guildId || guildId.guildId === redux.guildId;
if (tmp3) {
2026-10-06 22:12:49 +00:00
const tmp5 = null == guildId.channelId || guildId.channelId === redux.getNextChannelId();
if (tmp5) {
redux.connect(guildId.endpoint, guildId.token);
}
tmp3 = tmp5;
}
tmp = tmp3;
}
return tmp;
},
CLEAR_REMOTE_DISCONNECT_VOICE_CHANNEL_ID: handleClearRemoteDisconnectVoiceChannelId,
REMOTE_SESSION_CONNECT: handleClearRemoteDisconnectVoiceChannelId,
CLEAR_LAST_SESSION_VOICE_CHANNEL_ID: function handleClearLastSessionVoiceChannelId() {
c16 = null;
},
GUILD_DELETE: function handleGuildDelete(arg0) {
if (null != redux) {
if (redux.guildId === tmp.id) {
destroyRTCConnection();
}
}
return false;
},
CHANNEL_DELETE: handleChannelDelete,
THREAD_DELETE: handleChannelDelete,
CALL_DELETE: function handleCallDelete(arg0) {
if (null != redux) {
if (redux.channelId === tmp) {
destroyRTCConnection();
}
}
return false;
},
APP_STATE_UPDATE: function handleFocus(state) {
2026-10-06 22:12:49 +00:00
const tmp = state.state === constants2.ACTIVE && null != redux;
if (tmp) {
redux.resetBackoff("App state is active");
}
return false;
},
RTC_DEBUG_SET_SIMULCAST_OVERRIDE: function handleSimulcastDebugOverrideChanged(arg0) {
2026-10-06 22:12:49 +00:00
const obj = redux;
if (redux != null) {
const result = obj.setSimulcastDebugOverride(tmp, tmp2, tmp3);
}
}
};
2026-10-06 22:12:49 +00:00
const rTCConnectionStore = new RTCConnectionStore(DispatcherDefault, obj);
const promise = asyncRequire(1253, dependencyMap.paths);
promise.then((addExtraAnalyticsDecorator) => {
let state;
const result = addExtraAnalyticsDecorator.addExtraAnalyticsDecorator((arg0) => {
arg0.client_rtc_state = state.getState();
});
});
let result = size.fileFinishedImporting("stores/RTCConnectionStore.tsx");
export default rTCConnectionStore;