decord/alpha/source/actions/RTCDebugActionCreators.tsx

54 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 5135
// Function ID: 5136
// Name: RTCDebugActionCreators
2026-10-09 10:00:15 +00:00
// Dependencies: [584, 4690, 2]
2026-10-08 09:57:35 +00:00
// Exports: chooseReplayPath, close, open, openReplay, setSection, setSimulcastDebugOverride
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 5135 (RTCDebugActionCreators)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
2026-10-09 10:00:15 +00:00
import DiscordNativeDefault from "DiscordNative" /* 4690 */;
2026-10-03 08:58:59 +00:00
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 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
});
};