decord/alpha/source/actions/RTCDebugActionCreators.tsx

50 lines
2.2 KiB
TypeScript
Raw Normal View History

// Module ID: 9694
// Function ID: 9695
// Name: RTCDebugActionCreators
// Dependencies: [9693, 573, 9302, 4479, 2]
2026-07-20 16:05:17 +00:00
// Exports: chooseReplayPath, close, open, openReplay, setSection, setShouldRecordNextConnection, setSimulcastDebugOverride
// Module 9694 (RTCDebugActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import DiscordNativeDefault from "DiscordNative" /* 4479 */;
import trackVoiceAndVideoSettingsUpdateDefault from "trackVoiceAndVideoSettingsUpdate" /* 9302 */;
import RTCDebugStore from "RTCDebugStore" /* 9693 */;
2026-07-20 16:05:17 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("actions/RTCDebugActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const open = function open(section) {
DispatcherDefault.dispatch({ type: "RTC_DEBUG_MODAL_OPEN", section });
const obj2 = { type: "RTC_DEBUG_MODAL_OPEN", section };
DispatcherDefault.dispatch({ type: "RTC_DEBUG_POPOUT_WINDOW_OPEN" });
2026-07-20 16:05:17 +00:00
};
export const close = function close() {
DispatcherDefault.dispatch({ type: "RTC_DEBUG_MODAL_CLOSE" });
2026-07-20 16:05:17 +00:00
};
export const openReplay = function openReplay() {
DispatcherDefault.dispatch({ type: "RTC_DEBUG_MODAL_OPEN_REPLAY" });
2026-07-20 16:05:17 +00:00
};
export const setSection = function setSection(section) {
DispatcherDefault.dispatch({ type: "RTC_DEBUG_MODAL_SET_SECTION", section });
2026-07-20 16:05:17 +00:00
};
export const setShouldRecordNextConnection = function setShouldRecordNextConnection(value) {
trackVoiceAndVideoSettingsUpdateDefault("connection_replay_log_enabled", value, RTCDebugStore.shouldRecordNextConnection());
DispatcherDefault.dispatch({ type: "RTC_DEBUG_SET_RECORDING_FLAG", value });
2026-07-20 16:05:17 +00:00
};
export const setSimulcastDebugOverride = function setSimulcastDebugOverride(userId, context, quality) {
DispatcherDefault.dispatch({ type: "RTC_DEBUG_SET_SIMULCAST_OVERRIDE", userId, context, quality });
2026-07-20 16:05:17 +00:00
};
export const chooseReplayPath = function chooseReplayPath() {
const fileManager = DiscordNativeDefault.fileManager;
const obj = { filters: null };
2026-07-23 10:11:24 +00:00
const items = [{ name: "All Files", extensions: ["*"] }];
obj.filters = items;
fileManager.showOpenDialog(obj).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
}
DispatcherDefault.dispatch({ type: "RTC_DEBUG_MODAL_OPEN_REPLAY_AT_PATH", path: str });
2026-07-20 16:05:17 +00:00
});
};