decord/source/modules/video_calls/native/useIsVideoMode.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

59 lines
2.1 KiB
TypeScript

// Module ID: 9497
// Function ID: 9498
// Name: useIsVideoMode
// Dependencies: [4596, 1957, 1908, 2011, 4593, 504, 2]
// Exports: default, isVideoMode
// Module 9497 (useIsVideoMode)
import initialize from "initialize" /* 504 */;
import ApplicationStreamingStore from "ApplicationStreamingStore" /* 4596 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import MediaEngineStore from "MediaEngineStore" /* 1908 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2011 */;
import VoiceStateStore from "VoiceStateStore" /* 4593 */;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/video_calls/native/useIsVideoMode.tsx");
export default function useIsVideoMode() {
const items = [ChannelStore, SelectedChannelStore, MediaEngineStore, VoiceStateStore, ApplicationStreamingStore];
return initialize.useStateFromStores(items, () => {
channel = channel.getChannel(voiceChannelId.getVoiceChannelId());
let tmp2 = null != channel;
if (tmp2) {
tmp2 = ApplicationStreamingStore.getAllActiveStreams().length > 0 || VoiceStateStore.hasVideo(channel.id) || MediaEngineStore.isVideoEnabled();
const tmp3 = ApplicationStreamingStore.getAllActiveStreams().length > 0 || VoiceStateStore.hasVideo(channel.id) || MediaEngineStore.isVideoEnabled();
}
return tmp2;
});
};
export const isVideoMode = function isVideoMode(arg0, arg1, arg2, arg3, arg4) {
let obj = arg0;
if (arg0 === undefined) {
obj = ChannelStore;
}
let obj2 = arg1;
if (arg1 === undefined) {
obj2 = SelectedChannelStore;
}
let obj3 = arg2;
if (arg2 === undefined) {
obj3 = ApplicationStreamingStore;
}
let obj4 = arg3;
if (arg3 === undefined) {
obj4 = VoiceStateStore;
}
let obj5 = arg4;
if (arg4 === undefined) {
obj5 = MediaEngineStore;
}
const channel = obj.getChannel(obj2.getVoiceChannelId());
let tmp2 = null != channel;
if (tmp2) {
tmp2 = obj3.getAllActiveStreams().length > 0 || obj4.hasVideo(channel.id) || obj5.isVideoEnabled();
const tmp3 = obj3.getAllActiveStreams().length > 0 || obj4.hasVideo(channel.id) || obj5.isVideoEnabled();
}
return tmp2;
};