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

93 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 12132
// Function ID: 12133
2026-07-29 08:29:29 +00:00
// Name: isActivityJoinableOnCurrentPlatform
2026-08-15 05:55:55 +00:00
// Dependencies: [676, 501, 1625, 7260, 2]
2026-07-29 08:29:29 +00:00
// Exports: default, getCurrentActivityGamePlatform, isActivityJoinable
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 12132 (isActivityJoinableOnCurrentPlatform)
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-07-29 08:29:29 +00:00
let c3;
let c4;
let c5;
({ ActivityFlags: c3, ActivityGamePlatforms: c4, ActivityTypes: c5 } = ME);
const result = require("isMetaQuest").fileFinishedImporting("modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx");
export default function isActivityJoinableOnCurrentPlatform(type) {
2026-07-20 16:05:17 +00:00
let tmp = null == type;
if (!tmp) {
2026-08-15 05:55:55 +00:00
tmp = !importDefault(7260)(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-08-15 05:55:55 +00:00
let tmp6Result = tmp6(1625);
2026-07-29 08:29:29 +00:00
if (tmp6Result.isMetaQuest()) {
DESKTOP = constants2.META_QUEST;
tmp9 = constants2;
} else {
tmp6Result = tmp6(501);
if (tmp6Result.isAndroid()) {
DESKTOP = tmp8.ANDROID;
tmp9 = tmp8;
} else {
DESKTOP = tmp8.DESKTOP;
tmp9 = tmp8;
}
}
}
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;
}
2026-07-29 08:29:29 +00:00
obj = require(501) /* PlatformTypes */;
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 {
2026-08-15 05:55:55 +00:00
let tmpResult = tmp(1625);
2026-07-29 08:29:29 +00:00
if (tmpResult.isMetaQuest()) {
META_QUEST = constants2.META_QUEST;
} else {
tmpResult = tmp(501);
META_QUEST = tmpResult.isAndroid() ? tmp3.ANDROID : tmp3.DESKTOP;
}
}
return META_QUEST;
};
export const isActivityJoinable = function isActivityJoinable(type) {
let tmp = null == type;
if (!tmp) {
2026-08-15 05:55:55 +00:00
tmp = !importDefault(7260)(type, constants.JOIN);
2026-07-29 08:29:29 +00:00
}
if (!tmp) {
tmp = type.type !== constants3.PLAYING;
}
return !tmp;
};