18 lines
1.2 KiB
TypeScript
18 lines
1.2 KiB
TypeScript
// Metro module 9055 (f9056).
|
|
import ApplicationStreamingStore from "../../../stores/ApplicationStreamingStore";
|
|
import ChannelStore from "../../../stores/ChannelStore";
|
|
import MediaEngineStore from "../../../stores/MediaEngineStore";
|
|
import SelectedChannelStore from "../../../stores/SelectedChannelStore";
|
|
import VoiceStateStore from "../../../stores/VoiceStateStore";
|
|
import { useStateFromStores } from "../../../_bundle/Module589";
|
|
export default function useIsVideoMode() {
|
|
return useStateFromStores([ChannelStore, SelectedChannelStore, MediaEngineStore, VoiceStateStore, ApplicationStreamingStore], () => {
|
|
const channel = ChannelStore.getChannel(SelectedChannelStore.getVoiceChannelId());
|
|
return channel != null && (ApplicationStreamingStore.getAllActiveStreams().length > 0 || VoiceStateStore.hasVideo(channel.id) || MediaEngineStore.isVideoEnabled());
|
|
});
|
|
};
|
|
export function isVideoMode(r4 = ChannelStore, r8 = SelectedChannelStore, r6 = ApplicationStreamingStore, r7 = VoiceStateStore, r5 = MediaEngineStore) {
|
|
const channel = r4.getChannel(r8.getVoiceChannelId());
|
|
return channel != null && (r6.getAllActiveStreams().length > 0 || r7.hasVideo(channel.id) || r5.isVideoEnabled());
|
|
}
|