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

38 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-10-02 13:37:24 +00:00
// Module ID: 8779
// Function ID: 8780
// Name: tryLaunchAsFrame
2026-10-02 13:37:24 +00:00
// Dependencies: [5064, 8497, 8778, 8755, 2]
// Exports: tryLaunchAsFrame
2026-10-02 13:37:24 +00:00
// Module 8779 (tryLaunchAsFrame)
import FramesConstants from "FramesConstants" /* 8497 */;
import FramesActionCreatorsDefault from "FramesActionCreators" /* 8755 */;
import canLaunchFrame from "canLaunchFrame" /* 8778 */;
import ApplicationStore from "ApplicationStore" /* 5064 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
2026-10-01 14:13:23 +00:00
const MAIN_SURFACE = FramesConstants.MAIN_SURFACE;
const result = size.fileFinishedImporting("modules/activities/utils/tryLaunchAsFrame.tsx");
export const tryLaunchAsFrame = function tryLaunchAsFrame(applicationId) {
2026-10-01 14:13:23 +00:00
let analyticsContext;
let customId;
let referrerId;
applicationId = applicationId.applicationId;
({ customId, referrerId, analyticsContext } = applicationId);
const application = ApplicationStore.getApplication(applicationId);
let tmp2 = null == application;
if (!tmp2) {
2026-10-01 14:13:23 +00:00
const obj = canLaunchFrame;
tmp2 = !obj.canLaunchFrame(application);
}
let flag = !tmp2;
2026-10-01 14:13:23 +00:00
if (flag) {
const obj3 = { applicationId, surface: MAIN_SURFACE, customId, referrerId, analyticsContext };
2026-10-01 14:13:23 +00:00
const obj2 = FramesActionCreatorsDefault;
obj2.launchFrame(obj3);
flag = true;
}
return flag;
};