decord/source/modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx

93 lines
2.6 KiB
TypeScript
Raw Normal View History

// Module ID: 13130
// Function ID: 13131
2026-07-29 08:29:29 +00:00
// Name: isActivityJoinableOnCurrentPlatform
// Dependencies: [1074, 1116, 1608, 7387, 2]
2026-07-29 08:29:29 +00:00
// Exports: default, getCurrentActivityGamePlatform, isActivityJoinable
2026-07-20 16:05:17 +00:00
// Module 13130 (isActivityJoinableOnCurrentPlatform)
import utils_PlatformUtils from "utils/PlatformUtils" /* 1116 */;
import hasFlagDefault from "hasFlag" /* 7387 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
({ ActivityFlags: c3, ActivityGamePlatforms: closure_4, ActivityTypes: hasOwnProperty } = Constants);
const result = size.fileFinishedImporting("modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx");
2026-07-29 08:29:29 +00:00
export default function isActivityJoinableOnCurrentPlatform(type) {
2026-07-20 16:05:17 +00:00
let tmp = null == type;
if (!tmp) {
2026-08-24 06:08:38 +00:00
tmp = !hasFlagDefault(type, constants.JOIN);
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
tmp = type.type !== constants3.PLAYING;
}
2026-07-29 08:29:29 +00:00
if (!tmp) {
if (obj.isIOS()) {
let DESKTOP = constants2.IOS;
let tmp9 = constants2;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (tmp6Result.isMetaQuest()) {
DESKTOP = constants2.META_QUEST;
tmp9 = constants2;
} else {
if (tmp6Result2.isAndroid()) {
2026-07-29 08:29:29 +00:00
DESKTOP = tmp8.ANDROID;
tmp9 = tmp8;
} else {
DESKTOP = tmp8.DESKTOP;
tmp9 = tmp8;
}
tmp6Result2 = tmp6(1116);
2026-07-29 08:29:29 +00:00
}
tmp6Result = tmp6(1608);
2026-07-29 08:29:29 +00:00
}
let platform;
if (type != null) {
platform = type.platform;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if ((null != platform ? type.platform : tmp9.DESKTOP) === DESKTOP) {
2026-07-20 16:05:17 +00:00
return true;
} else {
let supported_platforms;
2026-07-29 08:29:29 +00:00
if (type != null) {
supported_platforms = type.supported_platforms;
2026-07-20 16:05:17 +00:00
}
let hasItem = null != supported_platforms;
if (hasItem) {
hasItem = 0 !== supported_platforms.length;
}
if (hasItem) {
2026-07-29 08:29:29 +00:00
hasItem = supported_platforms.includes(DESKTOP);
2026-07-20 16:05:17 +00:00
}
return hasItem;
}
obj = utils_PlatformUtils;
2026-07-20 16:05:17 +00:00
} else {
return false;
}
};
2026-07-29 08:29:29 +00:00
export const getCurrentActivityGamePlatform = function getCurrentActivityGamePlatform() {
if (obj.isIOS()) {
let META_QUEST = constants2.IOS;
} else {
if (tmpResult.isMetaQuest()) {
META_QUEST = constants2.META_QUEST;
} else {
META_QUEST = tmp(1116).isAndroid() ? tmp3.ANDROID : tmp3.DESKTOP;
const tmpResult2 = tmp(1116);
2026-07-29 08:29:29 +00:00
}
tmpResult = tmp(1608);
2026-07-29 08:29:29 +00:00
}
return META_QUEST;
};
export const isActivityJoinable = function isActivityJoinable(type) {
let tmp = null == type;
if (!tmp) {
2026-08-24 06:08:38 +00:00
tmp = !hasFlagDefault(type, constants.JOIN);
2026-07-29 08:29:29 +00:00
}
if (!tmp) {
tmp = type.type !== constants3.PLAYING;
}
return !tmp;
};