decord/source/modules/video_calls/useHasVideoPermission.tsx

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10969
// Function ID: 10970
2026-07-20 16:05:17 +00:00
// Name: useHasVideoPermission
2026-08-24 06:08:38 +00:00
// Dependencies: [1910, 4024, 589, 7516, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getVideoPermission
2026-08-24 06:08:38 +00:00
// Module 10969 (useHasVideoPermission)
import canStreamInChannel from "canStreamInChannel" /* 7516 */;
import closure_2 from "createGuildRecordFromRust" /* 1910 */;
import closure_3 from "getUncachedChannelPermissions" /* 4024 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/video_calls/useHasVideoPermission.tsx");
2026-07-20 16:05:17 +00:00
export default function useHasVideoPermission(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-08-24 06:08:38 +00:00
const items = [closure_2, closure_3];
2026-07-20 16:05:17 +00:00
const items1 = [arg0];
2026-07-29 08:29:29 +00:00
return _require(589).useStateFromStores(items, () => {
let tmp = null != callback;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
let isPrivateResult = obj.isPrivate();
2026-07-20 16:05:17 +00:00
if (!isPrivateResult) {
2026-08-24 06:08:38 +00:00
const obj2 = callback(closure_1_1[3]);
isPrivateResult = obj2.canStreamInChannel(obj, closure_1_2, closure_1_3, false);
2026-07-20 16:05:17 +00:00
}
tmp = isPrivateResult;
}
return tmp;
}, items1);
};
export const getVideoPermission = function getVideoPermission(channel) {
let isPrivateResult = channel.isPrivate();
if (!isPrivateResult) {
2026-08-24 06:08:38 +00:00
const obj = canStreamInChannel;
isPrivateResult = obj.canStreamInChannel(channel, closure_2, closure_3, false);
2026-07-20 16:05:17 +00:00
}
return isPrivateResult;
};