decord/alpha/source/actions/ChannelRTCActionCreators.tsx

73 lines
3.3 KiB
TypeScript
Raw Normal View History

// Module ID: 5046
// Function ID: 5047
// Name: ChannelRTCActionCreators
// Dependencies: [1074, 573, 1241, 5025, 1110, 2]
2026-07-20 16:05:17 +00:00
// Module 5046 (ChannelRTCActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import ComponentDispatchUtils from "ComponentDispatchUtils" /* 1110 */;
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 5025 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
({ AppContext: c3, AnalyticEvents: closure_4, ComponentActions: hasOwnProperty } = Constants);
const result = size.fileFinishedImporting("actions/ChannelRTCActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
rebuildRTCActiveChannels() {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_ACTIVE_CHANNELS" });
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
selectParticipant(id, id2) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_SELECT_PARTICIPANT", channelId: id, id: id2 });
2026-07-20 16:05:17 +00:00
},
popoutParticipant(channelId, participantId) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_POPOUT_PARTICIPANT", channelId, participantId });
2026-07-20 16:05:17 +00:00
},
returnParticipant(channelId, participantId) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_RETURN_PARTICIPANT", channelId, participantId });
2026-07-20 16:05:17 +00:00
},
updateLayout(channelId, video_layout) {
2026-07-20 16:05:17 +00:00
let APP = arg2;
if (arg2 === undefined) {
APP = constants.APP;
}
const obj = AnalyticsUtilsDefault;
const obj2 = { video_layout };
const merged = Object.assign(AppAnalyticsUtils.collectVoiceAnalyticsMetadata(channelId));
obj.track(constants2.VIDEO_LAYOUT_TOGGLED, obj2);
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_UPDATE_LAYOUT", channelId, layout: video_layout, appContext: APP });
2026-07-20 16:05:17 +00:00
},
toggleParticipants(channelId, participantsOpen) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_UPDATE_PARTICIPANTS_OPEN", channelId, participantsOpen });
2026-07-20 16:05:17 +00:00
},
toggleVoiceParticipantsHidden(channelId, voiceParticipantsHidden) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_UPDATE_VOICE_PARTICIPANTS_HIDDEN", channelId, voiceParticipantsHidden });
2026-07-20 16:05:17 +00:00
},
updateStageStreamSize(channelId, large) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_UPDATE_STAGE_STREAM_SIZE", channelId, large });
2026-07-20 16:05:17 +00:00
},
updateStageVideoLimitBoostUpsellDismissed(channelId, dismissed) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_UPDATE_STAGE_VIDEO_LIMIT_BOOST_UPSELL_DISMISSED", channelId, dismissed });
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
updateChatOpen(id, shown) {
_require = id;
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_UPDATE_CHAT_OPEN", channelId: id, chatOpen: shown });
2026-07-29 08:29:29 +00:00
if (shown) {
2026-07-20 16:05:17 +00:00
const _setTimeout = setTimeout;
const timerId = setTimeout(() => {
const ComponentDispatch = ComponentDispatchUtils.ComponentDispatch;
ComponentDispatch.dispatch(constants3.FOCUS_CHANNEL_TEXT_AREA, { channelId });
2026-07-20 16:05:17 +00:00
}, 0);
} else {
let ComponentDispatch = require("ComponentDispatchUtils").ComponentDispatch;
2026-07-20 16:05:17 +00:00
ComponentDispatch.dispatch(constants3.FOCUS_CHAT_BUTTON);
}
},
2026-07-29 08:29:29 +00:00
jumpToVoiceChannelMessage(voiceGuildId2, voiceChannelId2, voiceMessageId2, jumpType) {
DispatcherDefault.dispatch({ type: "CHANNEL_RTC_JUMP_TO_VOICE_CHANNEL_MESSAGE", guildId: voiceGuildId2, channelId: voiceChannelId2, messageId: voiceMessageId2, jumpType });
2026-07-20 16:05:17 +00:00
}
};