decord/source/modules/frames/FramesManager.tsx

72 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-14 17:33:39 +00:00
// Module ID: 10969
// Function ID: 10970
2026-08-07 06:50:47 +00:00
// Name: leaveFrame
2026-08-14 17:33:39 +00:00
// Dependencies: [10582, 676, 4245, 5322, 10594, 10601, 698, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-14 17:33:39 +00:00
// Module 10969 (leaveFrame)
2026-07-29 08:29:29 +00:00
import map from "map";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-08-06 08:05:19 +00:00
import { TransportTypes } from "RPC_SCOPE_CONFIG";
2026-07-29 08:29:29 +00:00
import "initialize";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c4;
let c5;
let require = arg1;
({ AnalyticEvents: c4, RPCCloseCodes: c5 } = ME);
2026-08-07 06:50:47 +00:00
class FramesManager extends tmp3 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
closure_0 = applyArgumentsResult;
applyArgumentsResult.actions = {
RPC_APP_DISCONNECTED(arg0) {
applyArgumentsResult.handleRPCDisconnect(arg0);
},
FRAME_LAUNCH(applicationId) {
2026-08-14 17:33:39 +00:00
const result = applyArgumentsResult(10594).trackFrameSessionStart(applicationId.applicationId);
2026-08-07 06:50:47 +00:00
},
FRAME_LAUNCH_FAIL(applicationId) {
2026-08-14 17:33:39 +00:00
const result = applyArgumentsResult(10601).discardPendingFrameLaunch(applicationId.applicationId);
2026-08-07 06:50:47 +00:00
},
FRAME_STOP(applicationId) {
2026-08-14 17:33:39 +00:00
applyArgumentsResult(10594).trackFrameSessionEnd(applicationId.applicationId);
2026-08-07 06:50:47 +00:00
}
};
applyArgumentsResult.handleRPCDisconnect = function handleRPCDisconnect(arg0) {
let reason;
let source;
({ reason, source } = arg0);
if (null != reason) {
if (source.type === outer1_6.POST_MESSAGE) {
const frameByIframeId = outer1_3.getFrameByIframeId(source.iframeId);
if (null != frameByIframeId) {
applyArgumentsResult.leaveFrame(frameByIframeId.id);
if (reason.code !== outer1_5.CLOSE_NORMAL) {
let obj = outer1_1(outer1_2[6]);
obj = { rpc_close_code: null, rpc_message: null, application_id: null };
({ code: obj2[0], message: obj2[1] } = reason);
obj[2] = frameByIframeId.applicationId;
obj.track(outer1_4.ACTIVITY_CLOSED_RPC_ERROR, obj);
const result = obj3.showRPCDisconnectErrorUI(reason);
}
obj3 = applyArgumentsResult;
2026-07-29 08:29:29 +00:00
}
}
}
2026-08-07 06:50:47 +00:00
};
return applyArgumentsResult;
}
2026-07-20 16:05:17 +00:00
}
2026-08-07 06:50:47 +00:00
FramesManager.prototype["leaveFrame"] = function leaveFrame(closure_0) {
frame = frame.getFrame(closure_0);
if (null != frame) {
let obj = importDefault(709);
obj = { type: "FRAME_STOP", applicationId: null, frameId: null };
({ applicationId: obj2[1], id: obj2[2] } = frame);
obj.dispatch(obj);
}
};
FramesManager.displayName = "FramesManager";
2026-08-06 08:05:19 +00:00
let result = require("RPC_SCOPE_CONFIG").fileFinishedImporting("modules/frames/FramesManager.tsx");
2026-07-20 16:05:17 +00:00
2026-08-07 06:50:47 +00:00
export default FramesManager;