decord/alpha/source/actions/RTCDebugActionCreators.tsx

63 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-10-03 08:58:59 +00:00
// Module ID: 9723
// Function ID: 9724
// Name: RTCDebugActionCreators
2026-10-03 08:58:59 +00:00
// Dependencies: [9722, 584, 9311, 4490, 2]
2026-07-20 16:05:17 +00:00
// Exports: chooseReplayPath, close, open, openReplay, setSection, setShouldRecordNextConnection, setSimulcastDebugOverride
2026-10-03 08:58:59 +00:00
// Module 9723 (RTCDebugActionCreators)
import DispatcherDefault from "Dispatcher" /* 584 */;
import DiscordNativeDefault from "DiscordNative" /* 4490 */;
import trackVoiceAndVideoSettingsUpdateDefault from "trackVoiceAndVideoSettingsUpdate" /* 9311 */;
import RTCDebugStore from "RTCDebugStore" /* 9722 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
const result = size.fileFinishedImporting("actions/RTCDebugActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const open = function open(section) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_MODAL_OPEN", section };
2026-10-03 08:58:59 +00:00
obj.dispatch(obj2);
const obj3 = DispatcherDefault;
obj3.dispatch({ type: "RTC_DEBUG_POPOUT_WINDOW_OPEN" });
2026-07-20 16:05:17 +00:00
};
export const close = function close() {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "RTC_DEBUG_MODAL_CLOSE" });
2026-07-20 16:05:17 +00:00
};
export const openReplay = function openReplay() {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "RTC_DEBUG_MODAL_OPEN_REPLAY" });
2026-07-20 16:05:17 +00:00
};
export const setSection = function setSection(section) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_MODAL_SET_SECTION", section };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
};
export const setShouldRecordNextConnection = function setShouldRecordNextConnection(value) {
2026-10-03 08:58:59 +00:00
const tmp = trackVoiceAndVideoSettingsUpdateDefault;
tmp("connection_replay_log_enabled", value, RTCDebugStore.shouldRecordNextConnection());
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_SET_RECORDING_FLAG", value };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
};
export const setSimulcastDebugOverride = function setSimulcastDebugOverride(userId, context, quality) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_SET_SIMULCAST_OVERRIDE", userId, context, quality };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
};
export const chooseReplayPath = function chooseReplayPath() {
2026-10-03 08:58:59 +00:00
let items;
const fileManager = DiscordNativeDefault.fileManager;
2026-10-03 08:58:59 +00:00
let obj = { filters: items };
items = [{ name: "All Files", extensions: ["*"] }];
const showOpenDialogResult = fileManager.showOpenDialog(obj);
showOpenDialogResult.then((result) => {
2026-07-20 16:05:17 +00:00
let str = "";
if (0 !== result.length) {
str = result[0];
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "RTC_DEBUG_MODAL_OPEN_REPLAY_AT_PATH", path: str });
2026-07-20 16:05:17 +00:00
});
};