decord/beta/source/actions/RTCDebugActionCreators.tsx

54 lines
1.9 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 5136
// Function ID: 5137
// Name: RTCDebugActionCreators
2026-10-12 16:32:48 +00:00
// Dependencies: [584, 4731, 2]
// Exports: chooseReplayPath, close, open, openReplay, setSection, setSimulcastDebugOverride
2026-10-12 16:32:48 +00:00
// Module 5136 (RTCDebugActionCreators)
2026-10-07 22:43:51 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
2026-10-12 16:32:48 +00:00
import DiscordNativeDefault from "DiscordNative" /* 4731 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("actions/RTCDebugActionCreators.tsx");
export const open = function open(section) {
2026-10-01 14:13:23 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_MODAL_OPEN", section };
2026-10-01 14:13:23 +00:00
obj.dispatch(obj2);
const obj3 = DispatcherDefault;
obj3.dispatch({ type: "RTC_DEBUG_POPOUT_WINDOW_OPEN" });
};
export const close = function close() {
2026-10-01 14:13:23 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "RTC_DEBUG_MODAL_CLOSE" });
};
export const openReplay = function openReplay() {
2026-10-01 14:13:23 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "RTC_DEBUG_MODAL_OPEN_REPLAY" });
};
export const setSection = function setSection(section) {
2026-10-01 14:13:23 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_MODAL_SET_SECTION", section };
obj.dispatch(obj2);
};
export const setSimulcastDebugOverride = function setSimulcastDebugOverride(userId, context, quality) {
2026-10-01 14:13:23 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "RTC_DEBUG_SET_SIMULCAST_OVERRIDE", userId, context, quality };
obj.dispatch(obj2);
};
export const chooseReplayPath = function chooseReplayPath() {
2026-10-01 14:13:23 +00:00
let items;
const fileManager = DiscordNativeDefault.fileManager;
2026-10-01 14:13:23 +00:00
let obj = { filters: items };
items = [{ name: "All Files", extensions: ["*"] }];
const showOpenDialogResult = fileManager.showOpenDialog(obj);
showOpenDialogResult.then((result) => {
let str = "";
if (0 !== result.length) {
str = result[0];
}
2026-10-01 14:13:23 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "RTC_DEBUG_MODAL_OPEN_REPLAY_AT_PATH", path: str });
});
};