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

33 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 9653
// Function ID: 9654
2026-07-20 16:05:17 +00:00
// Name: tryLaunchAsFrame
// Dependencies: [4864, 9641, 9636, 9637, 2]
2026-07-20 16:05:17 +00:00
// Exports: tryLaunchAsFrame
// Module 9653 (tryLaunchAsFrame)
import canLaunchFrame from "canLaunchFrame" /* 9636 */;
import FramesActionCreatorsDefault from "FramesActionCreators" /* 9637 */;
import ApplicationStore from "ApplicationStore" /* 4864 */;
2026-07-23 10:11:24 +00:00
require = fn;
const MAIN_SURFACE = fn(9641).MAIN_SURFACE;
const size = fn(2);
const result = size.fileFinishedImporting("modules/activities/utils/tryLaunchAsFrame.tsx");
2026-07-20 16:05:17 +00:00
export const tryLaunchAsFrame = function tryLaunchAsFrame(applicationId) {
applicationId = applicationId.applicationId;
({ customId, referrerId, analyticsContext } = applicationId);
const application = ApplicationStore.getApplication(applicationId);
2026-07-20 16:05:17 +00:00
let tmp2 = null == application;
if (!tmp2) {
tmp2 = !canLaunchFrame.canLaunchFrame(application);
2026-07-20 16:05:17 +00:00
}
let flag = !tmp2;
if (!tmp2) {
const obj3 = { applicationId, surface: MAIN_SURFACE, customId, referrerId, analyticsContext };
FramesActionCreatorsDefault.launchFrame(obj3);
2026-07-20 16:05:17 +00:00
flag = true;
}
return flag;
};