@truewatchtech/cocos-sdk 0.1.0-alpha.4 → 0.1.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -1
- package/bin/cli.cjs +48 -18
- package/bin/legacy-asset-hashes.json +32 -0
- package/bin/managed-assets.cjs +67 -0
- package/dist/creator2/core/client.d.ts +23 -7
- package/dist/creator2/core/client.d.ts.map +1 -1
- package/dist/creator2/core/client.js +74 -28
- package/dist/creator2/core/client.js.map +1 -1
- package/dist/creator2/core/index.d.ts +1 -1
- package/dist/creator2/core/index.d.ts.map +1 -1
- package/dist/creator2/core/index.js.map +1 -1
- package/dist/creator2/core/plugin-api.d.ts +15 -0
- package/dist/creator2/core/plugin-api.d.ts.map +1 -0
- package/dist/creator2/core/plugin-api.js +3 -0
- package/dist/creator2/core/plugin-api.js.map +1 -0
- package/dist/creator2/core/types.d.ts +0 -78
- package/dist/creator2/core/types.d.ts.map +1 -1
- package/dist/creator2/core/validation.d.ts +0 -11
- package/dist/creator2/core/validation.d.ts.map +1 -1
- package/dist/creator2/core/validation.js +0 -63
- package/dist/creator2/core/validation.js.map +1 -1
- package/dist/creator2/core/version.d.ts +1 -1
- package/dist/creator2/core/version.js +1 -1
- package/dist/creator2/creator2/auto.d.ts +1 -3
- package/dist/creator2/creator2/auto.d.ts.map +1 -1
- package/dist/creator2/creator2/auto.js +0 -25
- package/dist/creator2/creator2/auto.js.map +1 -1
- package/dist/creator2/creator2/index.d.ts +0 -7
- package/dist/creator2/creator2/index.d.ts.map +1 -1
- package/dist/creator2/creator2/index.js +1 -13
- package/dist/creator2/creator2/index.js.map +1 -1
- package/dist/creator2/creator2/transport.d.ts +0 -1
- package/dist/creator2/creator2/transport.d.ts.map +1 -1
- package/dist/creator2/creator2/transport.js +0 -4
- package/dist/creator2/creator2/transport.js.map +1 -1
- package/dist/creator3/core/client.d.ts +23 -7
- package/dist/creator3/core/client.d.ts.map +1 -1
- package/dist/creator3/core/client.js +72 -28
- package/dist/creator3/core/client.js.map +1 -1
- package/dist/creator3/core/index.d.ts +1 -1
- package/dist/creator3/core/index.d.ts.map +1 -1
- package/dist/creator3/core/index.js.map +1 -1
- package/dist/creator3/core/plugin-api.d.ts +15 -0
- package/dist/creator3/core/plugin-api.d.ts.map +1 -0
- package/dist/creator3/core/plugin-api.js +2 -0
- package/dist/creator3/core/plugin-api.js.map +1 -0
- package/dist/creator3/core/types.d.ts +0 -78
- package/dist/creator3/core/types.d.ts.map +1 -1
- package/dist/creator3/core/validation.d.ts +0 -11
- package/dist/creator3/core/validation.d.ts.map +1 -1
- package/dist/creator3/core/validation.js +0 -61
- package/dist/creator3/core/validation.js.map +1 -1
- package/dist/creator3/core/version.d.ts +1 -1
- package/dist/creator3/core/version.js +1 -1
- package/dist/creator3/creator3/auto.d.ts +1 -3
- package/dist/creator3/creator3/auto.d.ts.map +1 -1
- package/dist/creator3/creator3/auto.js +1 -24
- package/dist/creator3/creator3/auto.js.map +1 -1
- package/dist/creator3/creator3/index.d.ts +0 -7
- package/dist/creator3/creator3/index.d.ts.map +1 -1
- package/dist/creator3/creator3/index.js +1 -12
- package/dist/creator3/creator3/index.js.map +1 -1
- package/dist/creator3/creator3/transport.d.ts +0 -1
- package/dist/creator3/creator3/transport.d.ts.map +1 -1
- package/dist/creator3/creator3/transport.js +0 -4
- package/dist/creator3/creator3/transport.js.map +1 -1
- package/extensions/creator2/install-native.cjs +118 -28
- package/extensions/creator2/install-spm.cjs +198 -0
- package/extensions/creator2/legacy-asset-hashes.json +32 -0
- package/extensions/creator2/managed-assets.cjs +67 -0
- package/extensions/creator3/install-native.cjs +118 -28
- package/extensions/creator3/install-spm.cjs +198 -0
- package/extensions/creator3/legacy-asset-hashes.json +32 -0
- package/extensions/creator3/managed-assets.cjs +67 -0
- package/native/android/src/main/java/com/ft/sdk/cocos/FTBridgeTransport.java +85 -0
- package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridge.java +2 -192
- package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridgeModules.java +9 -0
- package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridgeProvider.java +1 -1
- package/native/ios/FTCocosBridge.m +8 -203
- package/native/ios/FTCocosBridge.podspec +3 -4
- package/native/ios/Package.swift +25 -0
- package/native/ios/include/FTCocosBridge.h +2 -0
- package/package.json +10 -5
- package/plugin-api/package.json +4 -0
- package/components/creator2/ReplayPrivacy.ts +0 -23
- package/components/creator3/ReplayPrivacy.ts +0 -25
- package/dist/creator2/core/replay-async-transport.d.ts +0 -4
- package/dist/creator2/core/replay-async-transport.d.ts.map +0 -1
- package/dist/creator2/core/replay-async-transport.js +0 -67
- package/dist/creator2/core/replay-async-transport.js.map +0 -1
- package/dist/creator2/core/replay-budget.d.ts +0 -28
- package/dist/creator2/core/replay-budget.d.ts.map +0 -1
- package/dist/creator2/core/replay-budget.js +0 -113
- package/dist/creator2/core/replay-budget.js.map +0 -1
- package/dist/creator2/core/replay-diagnostics.d.ts +0 -36
- package/dist/creator2/core/replay-diagnostics.d.ts.map +0 -1
- package/dist/creator2/core/replay-diagnostics.js +0 -40
- package/dist/creator2/core/replay-diagnostics.js.map +0 -1
- package/dist/creator2/core/replay-encoding.d.ts +0 -31
- package/dist/creator2/core/replay-encoding.d.ts.map +0 -1
- package/dist/creator2/core/replay-encoding.js +0 -63
- package/dist/creator2/core/replay-encoding.js.map +0 -1
- package/dist/creator2/core/replay-file.d.ts +0 -5
- package/dist/creator2/core/replay-file.d.ts.map +0 -1
- package/dist/creator2/core/replay-file.js +0 -101
- package/dist/creator2/core/replay-file.js.map +0 -1
- package/dist/creator2/core/replay-pixels.d.ts +0 -3
- package/dist/creator2/core/replay-pixels.d.ts.map +0 -1
- package/dist/creator2/core/replay-pixels.js +0 -16
- package/dist/creator2/core/replay-pixels.js.map +0 -1
- package/dist/creator2/core/replay-privacy-nodes.d.ts +0 -14
- package/dist/creator2/core/replay-privacy-nodes.d.ts.map +0 -1
- package/dist/creator2/core/replay-privacy-nodes.js +0 -18
- package/dist/creator2/core/replay-privacy-nodes.js.map +0 -1
- package/dist/creator2/core/replay-privacy.d.ts +0 -15
- package/dist/creator2/core/replay-privacy.d.ts.map +0 -1
- package/dist/creator2/core/replay-privacy.js +0 -36
- package/dist/creator2/core/replay-privacy.js.map +0 -1
- package/dist/creator2/core/replay.d.ts +0 -99
- package/dist/creator2/core/replay.d.ts.map +0 -1
- package/dist/creator2/core/replay.js +0 -611
- package/dist/creator2/core/replay.js.map +0 -1
- package/dist/creator2/creator2/capture.d.ts +0 -17
- package/dist/creator2/creator2/capture.d.ts.map +0 -1
- package/dist/creator2/creator2/capture.js +0 -168
- package/dist/creator2/creator2/capture.js.map +0 -1
- package/dist/creator3/core/replay-async-transport.d.ts +0 -4
- package/dist/creator3/core/replay-async-transport.d.ts.map +0 -1
- package/dist/creator3/core/replay-async-transport.js +0 -16
- package/dist/creator3/core/replay-async-transport.js.map +0 -1
- package/dist/creator3/core/replay-budget.d.ts +0 -28
- package/dist/creator3/core/replay-budget.d.ts.map +0 -1
- package/dist/creator3/core/replay-budget.js +0 -105
- package/dist/creator3/core/replay-budget.js.map +0 -1
- package/dist/creator3/core/replay-diagnostics.d.ts +0 -36
- package/dist/creator3/core/replay-diagnostics.d.ts.map +0 -1
- package/dist/creator3/core/replay-diagnostics.js +0 -36
- package/dist/creator3/core/replay-diagnostics.js.map +0 -1
- package/dist/creator3/core/replay-encoding.d.ts +0 -31
- package/dist/creator3/core/replay-encoding.d.ts.map +0 -1
- package/dist/creator3/core/replay-encoding.js +0 -62
- package/dist/creator3/core/replay-encoding.js.map +0 -1
- package/dist/creator3/core/replay-file.d.ts +0 -5
- package/dist/creator3/core/replay-file.d.ts.map +0 -1
- package/dist/creator3/core/replay-file.js +0 -31
- package/dist/creator3/core/replay-file.js.map +0 -1
- package/dist/creator3/core/replay-pixels.d.ts +0 -3
- package/dist/creator3/core/replay-pixels.d.ts.map +0 -1
- package/dist/creator3/core/replay-pixels.js +0 -13
- package/dist/creator3/core/replay-pixels.js.map +0 -1
- package/dist/creator3/core/replay-privacy-nodes.d.ts +0 -14
- package/dist/creator3/core/replay-privacy-nodes.d.ts.map +0 -1
- package/dist/creator3/core/replay-privacy-nodes.js +0 -15
- package/dist/creator3/core/replay-privacy-nodes.js.map +0 -1
- package/dist/creator3/core/replay-privacy.d.ts +0 -15
- package/dist/creator3/core/replay-privacy.d.ts.map +0 -1
- package/dist/creator3/core/replay-privacy.js +0 -33
- package/dist/creator3/core/replay-privacy.js.map +0 -1
- package/dist/creator3/core/replay.d.ts +0 -99
- package/dist/creator3/core/replay.d.ts.map +0 -1
- package/dist/creator3/core/replay.js +0 -534
- package/dist/creator3/core/replay.js.map +0 -1
- package/dist/creator3/creator3/capture.d.ts +0 -17
- package/dist/creator3/creator3/capture.d.ts.map +0 -1
- package/dist/creator3/creator3/capture.js +0 -112
- package/dist/creator3/creator3/capture.js.map +0 -1
- package/dist/creator3/creator3/replay-render-cycle.d.ts +0 -9
- package/dist/creator3/creator3/replay-render-cycle.d.ts.map +0 -1
- package/dist/creator3/creator3/replay-render-cycle.js +0 -12
- package/dist/creator3/creator3/replay-render-cycle.js.map +0 -1
- package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosReplayImageJobs.java +0 -55
- package/native/ios/FTCocosReplayImageJobs.h +0 -11
- package/native/ios/FTCocosReplayImageJobs.m +0 -54
- package/native/shared/FTReplayFileBridge.h +0 -62
- package/native/shared/FTReplayFileWorker.h +0 -88
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { _decorator, Component, Enum } from 'cc';
|
|
2
|
-
|
|
3
|
-
const { ccclass, property, menu, disallowMultiple } = _decorator;
|
|
4
|
-
|
|
5
|
-
export enum ReplayPrivacyMode {
|
|
6
|
-
Mask = 0,
|
|
7
|
-
Hide = 1,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** Attach to a node or prefab to protect its bounds in Session Replay. */
|
|
11
|
-
@ccclass('ReplayPrivacy')
|
|
12
|
-
@menu('Session Replay/ReplayPrivacy')
|
|
13
|
-
@disallowMultiple
|
|
14
|
-
export default class ReplayPrivacy extends Component {
|
|
15
|
-
@property({
|
|
16
|
-
type: Enum(ReplayPrivacyMode),
|
|
17
|
-
tooltip: 'Mask fills the Replay region gray; Hide fills it black. The live scene is unchanged.',
|
|
18
|
-
})
|
|
19
|
-
mode: ReplayPrivacyMode = ReplayPrivacyMode.Mask;
|
|
20
|
-
|
|
21
|
-
/** Read by the SDK during capture; independent of SDK initialization order. */
|
|
22
|
-
get replayPrivacyMode(): 'mask' | 'hide' {
|
|
23
|
-
return this.mode === ReplayPrivacyMode.Hide ? 'hide' : 'mask';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FTNativeTransport } from './transport.js';
|
|
2
|
-
/** Polls a single native worker without keeping a synchronous bridge call open. */
|
|
3
|
-
export declare function invokeReplayAsync<T>(transport: FTNativeTransport, method: string, payload?: unknown): Promise<T | undefined>;
|
|
4
|
-
//# sourceMappingURL=replay-async-transport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-async-transport.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-async-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,mFAAmF;AACnF,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CASlI"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.invokeReplayAsync = invokeReplayAsync;
|
|
40
|
-
var transport_js_1 = require("./transport.js");
|
|
41
|
-
/** Polls a single native worker without keeping a synchronous bridge call open. */
|
|
42
|
-
function invokeReplayAsync(transport, method, payload) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
-
var job, result;
|
|
45
|
-
return __generator(this, function (_a) {
|
|
46
|
-
switch (_a.label) {
|
|
47
|
-
case 0:
|
|
48
|
-
job = transport.invoke('replay.beginSaveImage', { method: method, arguments: payload });
|
|
49
|
-
if (!job)
|
|
50
|
-
throw new Error('Rebuild the native bridge to enable asynchronous Replay encoding');
|
|
51
|
-
_a.label = 1;
|
|
52
|
-
case 1: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 16); })];
|
|
53
|
-
case 2:
|
|
54
|
-
_a.sent();
|
|
55
|
-
result = transport.invoke('replay.pollSaveImage', { job: job });
|
|
56
|
-
if (!result)
|
|
57
|
-
throw new Error('Replay encoding job is unavailable');
|
|
58
|
-
if (!result.pending)
|
|
59
|
-
return [2 /*return*/, (0, transport_js_1.parseTransportResponse)(result.response)];
|
|
60
|
-
_a.label = 3;
|
|
61
|
-
case 3: return [3 /*break*/, 1];
|
|
62
|
-
case 4: return [2 /*return*/];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=replay-async-transport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-async-transport.js","sourceRoot":"","sources":["../../../../../src/core/replay-async-transport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,8CASC;AAZD,+CAAwD;AAExD,mFAAmF;AACnF,SAAsB,iBAAiB,CAAI,SAA4B,EAAE,MAAc,EAAE,OAAiB;;;;;;oBAClG,GAAG,GAAG,SAAS,CAAC,MAAM,CAAS,uBAAuB,EAAE,EAAE,MAAM,QAAA,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;oBAC9F,IAAI,CAAC,GAAG;wBAAE,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;;wBAE5F,qBAAM,IAAI,OAAO,CAAO,UAAC,OAAO,IAAK,OAAA,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,EAAvB,CAAuB,CAAC,EAAA;;oBAA7D,SAA6D,CAAC;oBACxD,MAAM,GAAG,SAAS,CAAC,MAAM,CAA0C,sBAAsB,EAAE,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC;oBAC1G,IAAI,CAAC,MAAM;wBAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;oBACnE,IAAI,CAAC,MAAM,CAAC,OAAO;wBAAE,sBAAO,IAAA,qCAAsB,EAAI,MAAM,CAAC,QAAQ,CAAC,EAAC;;;;;;;CAE1E"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { FTResolvedReplayImagePolicy } from './validation.js';
|
|
2
|
-
export declare const REPLAY_KEY_FRAME_BURST_BYTES: number;
|
|
3
|
-
export interface FTReplayCaptureDecision {
|
|
4
|
-
allowed: boolean;
|
|
5
|
-
compressionQuality: number;
|
|
6
|
-
maxImageDimension: number;
|
|
7
|
-
maxFrameBytes: number;
|
|
8
|
-
usedBytes: number;
|
|
9
|
-
priority: boolean;
|
|
10
|
-
reason?: 'budget' | 'throttle';
|
|
11
|
-
}
|
|
12
|
-
/** Rolling image budget. Segment and pointer bytes intentionally remain outside this controller. */
|
|
13
|
-
export declare class FTReplayBudget {
|
|
14
|
-
private readonly policy;
|
|
15
|
-
private entries;
|
|
16
|
-
private lastCaptureAttempt;
|
|
17
|
-
private burstKeys;
|
|
18
|
-
private pressure;
|
|
19
|
-
constructor(policy: FTResolvedReplayImagePolicy);
|
|
20
|
-
reset(): void;
|
|
21
|
-
decide(timestamp: number, priorityKey?: string): FTReplayCaptureDecision;
|
|
22
|
-
record(timestamp: number, byteSize: number, priorityKey?: string): void;
|
|
23
|
-
usedBytes(timestamp: number): number;
|
|
24
|
-
private prune;
|
|
25
|
-
private decision;
|
|
26
|
-
private updatePressure;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=replay-budget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-budget.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-budget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAInE,eAAO,MAAM,4BAA4B,QAAa,CAAC;AAOvD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAChC;AAED,oGAAoG;AACpG,qBAAa,cAAc;IAMb,OAAO,CAAC,QAAQ,CAAC,MAAM;IALnC,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,QAAQ,CAA4D;gBAE/C,MAAM,EAAE,2BAA2B;IAEhE,KAAK,IAAI,IAAI;IAOb,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,uBAAuB;IA+BxE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAUvE,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAKpC,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,QAAQ;IA2BhB,OAAO,CAAC,cAAc;CA0BvB"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.FTReplayBudget = exports.REPLAY_KEY_FRAME_BURST_BYTES = void 0;
|
|
15
|
-
var WINDOW_MS = 60000;
|
|
16
|
-
var THROTTLED_CAPTURE_INTERVAL_MS = 2000;
|
|
17
|
-
exports.REPLAY_KEY_FRAME_BURST_BYTES = 100 * 1024;
|
|
18
|
-
/** Rolling image budget. Segment and pointer bytes intentionally remain outside this controller. */
|
|
19
|
-
var FTReplayBudget = /** @class */ (function () {
|
|
20
|
-
function FTReplayBudget(policy) {
|
|
21
|
-
this.policy = policy;
|
|
22
|
-
this.entries = [];
|
|
23
|
-
this.burstKeys = [];
|
|
24
|
-
this.pressure = 'normal';
|
|
25
|
-
}
|
|
26
|
-
FTReplayBudget.prototype.reset = function () {
|
|
27
|
-
this.entries = [];
|
|
28
|
-
this.lastCaptureAttempt = undefined;
|
|
29
|
-
this.burstKeys = [];
|
|
30
|
-
this.pressure = 'normal';
|
|
31
|
-
};
|
|
32
|
-
FTReplayBudget.prototype.decide = function (timestamp, priorityKey) {
|
|
33
|
-
var used = this.usedBytes(timestamp);
|
|
34
|
-
var ratio = used / this.policy.maxBytesPerMinute;
|
|
35
|
-
this.updatePressure(ratio);
|
|
36
|
-
var hasBurst = priorityKey !== undefined && !this.burstKeys.includes(priorityKey);
|
|
37
|
-
if (ratio >= 1 && !hasBurst)
|
|
38
|
-
return this.decision(false, 0, used, hasBurst, 'budget');
|
|
39
|
-
if (this.policy.adaptiveCapture
|
|
40
|
-
&& this.pressure !== 'normal'
|
|
41
|
-
&& this.lastCaptureAttempt !== undefined
|
|
42
|
-
&& timestamp - this.lastCaptureAttempt < THROTTLED_CAPTURE_INTERVAL_MS
|
|
43
|
-
&& !hasBurst) {
|
|
44
|
-
return this.decision(false, 0, used, hasBurst, 'throttle');
|
|
45
|
-
}
|
|
46
|
-
this.lastCaptureAttempt = timestamp;
|
|
47
|
-
var normalRemaining = Math.max(0, this.policy.maxBytesPerMinute - used);
|
|
48
|
-
var available = normalRemaining + (hasBurst ? exports.REPLAY_KEY_FRAME_BURST_BYTES : 0);
|
|
49
|
-
var frameLimit = hasBurst
|
|
50
|
-
? Math.min(Math.max(this.policy.maxFrameBytes, exports.REPLAY_KEY_FRAME_BURST_BYTES), available)
|
|
51
|
-
: Math.min(this.policy.maxFrameBytes, available);
|
|
52
|
-
return this.decision(frameLimit >= 1024, frameLimit, used, hasBurst, frameLimit >= 1024 ? undefined : 'budget');
|
|
53
|
-
};
|
|
54
|
-
FTReplayBudget.prototype.record = function (timestamp, byteSize, priorityKey) {
|
|
55
|
-
if (!Number.isFinite(byteSize) || byteSize <= 0)
|
|
56
|
-
return;
|
|
57
|
-
this.prune(timestamp);
|
|
58
|
-
this.entries.push({ timestamp: timestamp, byteSize: Math.round(byteSize) });
|
|
59
|
-
if (priorityKey && !this.burstKeys.includes(priorityKey)) {
|
|
60
|
-
this.burstKeys.push(priorityKey);
|
|
61
|
-
if (this.burstKeys.length > 64)
|
|
62
|
-
this.burstKeys.shift();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
FTReplayBudget.prototype.usedBytes = function (timestamp) {
|
|
66
|
-
this.prune(timestamp);
|
|
67
|
-
return this.entries.reduce(function (total, entry) { return total + entry.byteSize; }, 0);
|
|
68
|
-
};
|
|
69
|
-
FTReplayBudget.prototype.prune = function (timestamp) {
|
|
70
|
-
var cutoff = timestamp - WINDOW_MS;
|
|
71
|
-
while (this.entries.length > 0 && this.entries[0].timestamp <= cutoff)
|
|
72
|
-
this.entries.shift();
|
|
73
|
-
};
|
|
74
|
-
FTReplayBudget.prototype.decision = function (allowed, maxFrameBytes, usedBytes, priority, reason) {
|
|
75
|
-
var degraded = this.policy.adaptiveCapture
|
|
76
|
-
&& (this.pressure === 'degraded' || this.pressure === 'paused');
|
|
77
|
-
return __assign({ allowed: allowed, compressionQuality: degraded
|
|
78
|
-
? Math.max(0.25, Math.round(this.policy.compressionQuality * 0.75 * 100) / 100)
|
|
79
|
-
: this.policy.compressionQuality, maxImageDimension: degraded
|
|
80
|
-
? Math.min(this.policy.maxImageDimension, Math.max(240, Math.floor(this.policy.maxImageDimension * 0.75)))
|
|
81
|
-
: this.policy.maxImageDimension, maxFrameBytes: Math.max(0, Math.floor(maxFrameBytes)), usedBytes: usedBytes, priority: priority }, (reason ? { reason: reason } : {}));
|
|
82
|
-
};
|
|
83
|
-
FTReplayBudget.prototype.updatePressure = function (ratio) {
|
|
84
|
-
if (!this.policy.adaptiveCapture) {
|
|
85
|
-
this.pressure = 'normal';
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (ratio >= 1) {
|
|
89
|
-
this.pressure = 'paused';
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
if (ratio >= 0.9) {
|
|
93
|
-
this.pressure = 'degraded';
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (this.pressure === 'paused' || this.pressure === 'degraded') {
|
|
97
|
-
if (ratio >= 0.8) {
|
|
98
|
-
this.pressure = 'degraded';
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (ratio >= 0.75) {
|
|
103
|
-
this.pressure = 'throttled';
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
if (this.pressure === 'throttled' && ratio >= 0.65)
|
|
107
|
-
return;
|
|
108
|
-
this.pressure = 'normal';
|
|
109
|
-
};
|
|
110
|
-
return FTReplayBudget;
|
|
111
|
-
}());
|
|
112
|
-
exports.FTReplayBudget = FTReplayBudget;
|
|
113
|
-
//# sourceMappingURL=replay-budget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-budget.js","sourceRoot":"","sources":["../../../../../src/core/replay-budget.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,IAAM,SAAS,GAAG,KAAM,CAAC;AACzB,IAAM,6BAA6B,GAAG,IAAK,CAAC;AAC/B,QAAA,4BAA4B,GAAG,GAAG,GAAG,IAAI,CAAC;AAiBvD,oGAAoG;AACpG;IAME,wBAA6B,MAAmC;QAAnC,WAAM,GAAN,MAAM,CAA6B;QALxD,YAAO,GAA0B,EAAE,CAAC;QAEpC,cAAS,GAAa,EAAE,CAAC;QACzB,aAAQ,GAAmD,QAAQ,CAAC;IAET,CAAC;IAEpE,8BAAK,GAAL;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,+BAAM,GAAN,UAAO,SAAiB,EAAE,WAAoB;QAC5C,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACvC,IAAM,KAA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Q,CAAC;YACzB,OAAO;QACT,CAAC;QACD,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,OAAO;QACT,CAAC;QACD,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;YACjB,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;YAC3B,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;YAC/D,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;gBACjB,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;gBAC3B,OAAO;YACT,CAAC;QACH,CAAC;QACD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC5B,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO;QAC3D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IACH,qBAAC;AAAD,CAAC,AAvHD,IAuHC;AAvHY,wCAAc"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export type FTReplaySkipReason = 'dedupe' | 'approx_static' | 'throttle' | 'budget' | 'busy' | 'error';
|
|
2
|
-
export type FTReplayDiagnosticEvent = {
|
|
3
|
-
type: 'capture_attempt';
|
|
4
|
-
timestamp: number;
|
|
5
|
-
usedBytes: number;
|
|
6
|
-
maxBytesPerMinute: number;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'capture_skipped';
|
|
9
|
-
timestamp: number;
|
|
10
|
-
reason: FTReplaySkipReason;
|
|
11
|
-
} | {
|
|
12
|
-
type: 'image_saved';
|
|
13
|
-
timestamp: number;
|
|
14
|
-
byteSize: number;
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
mimeType?: string;
|
|
18
|
-
priority: boolean;
|
|
19
|
-
byteSizeSource: 'native' | 'frame_limit_estimate';
|
|
20
|
-
} | {
|
|
21
|
-
type: 'segment_encoded';
|
|
22
|
-
timestamp: number;
|
|
23
|
-
byteSize: number;
|
|
24
|
-
recordCount: number;
|
|
25
|
-
pointerRecordCount: number;
|
|
26
|
-
hasImage: boolean;
|
|
27
|
-
} | {
|
|
28
|
-
type: 'pointer_received';
|
|
29
|
-
timestamp: number;
|
|
30
|
-
eventType: 'down' | 'up' | 'move';
|
|
31
|
-
} | {
|
|
32
|
-
type: 'replay_stopped';
|
|
33
|
-
timestamp: number;
|
|
34
|
-
};
|
|
35
|
-
export declare function replayUtf8ByteLength(value: string): number;
|
|
36
|
-
//# sourceMappingURL=replay-diagnostics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,eAAe,GACf,UAAU,GACV,QAAQ,GACR,MAAM,GACN,OAAO,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GAC5F;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,GAC1E;IACA,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,QAAQ,GAAG,sBAAsB,CAAC;CACnD,GACC;IACA,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB,GACC;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;CAAE,GAClF;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBlD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiB1D"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emitReplayDiagnostic = emitReplayDiagnostic;
|
|
4
|
-
exports.replayUtf8ByteLength = replayUtf8ByteLength;
|
|
5
|
-
/** @internal Benchmark-only observer hook. Production builds leave it unset. */
|
|
6
|
-
function emitReplayDiagnostic(event) {
|
|
7
|
-
var observer = globalThis.__FT_COCOS_REPLAY_BENCHMARK_OBSERVER__;
|
|
8
|
-
if (typeof observer !== 'function')
|
|
9
|
-
return;
|
|
10
|
-
try {
|
|
11
|
-
observer(event);
|
|
12
|
-
}
|
|
13
|
-
catch (_a) {
|
|
14
|
-
// Diagnostics must never affect capture, storage, or upload behavior.
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function replayUtf8ByteLength(value) {
|
|
18
|
-
var bytes = 0;
|
|
19
|
-
for (var index = 0; index < value.length; index += 1) {
|
|
20
|
-
var code = value.charCodeAt(index);
|
|
21
|
-
if (code < 0x80)
|
|
22
|
-
bytes += 1;
|
|
23
|
-
else if (code < 0x800)
|
|
24
|
-
bytes += 2;
|
|
25
|
-
else if (code >= 0xd800 && code <= 0xdbff && index + 1 < value.length) {
|
|
26
|
-
var low = value.charCodeAt(index + 1);
|
|
27
|
-
if (low >= 0xdc00 && low <= 0xdfff) {
|
|
28
|
-
bytes += 4;
|
|
29
|
-
index += 1;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
bytes += 3;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else
|
|
36
|
-
bytes += 3;
|
|
37
|
-
}
|
|
38
|
-
return bytes;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=replay-diagnostics.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-diagnostics.js","sourceRoot":"","sources":["../../../../../src/core/replay-diagnostics.ts"],"names":[],"mappings":";;AAuCA,oDAQC;AAED,oDAiBC;AA5BD,gFAAgF;AAChF,SAAgB,oBAAoB,CAAC,KAA8B;IACjE,IAAM,QAAQ,GAAI,UAAuC,CAAC,sCAAsC,CAAC;IACjG,IAAI,OAAO,QAAQ,KAAK,UAAU;QAAE,OAAO;IAC3C,IAAI,CAAC;QACH,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;IAAC,WAAM,CAAC;QACP,sEAAsE;IACxE,CAAC;AACH,CAAC;AAED,SAAgB,oBAAoB,CAAC,KAAa;IAChD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,IAAI,GAAG,IAAI;YAAE,KAAK,IAAI,CAAC,CAAC;aACvB,IAAI,IAAI,GAAG,KAAK;YAAE,KAAK,IAAI,CAAC,CAAC;aAC7B,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,IAAI,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YACtE,IAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACxC,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;gBACnC,KAAK,IAAI,CAAC,CAAC;gBACX,KAAK,IAAI,CAAC,CAAC;YACb,CAAC;iBAAM,CAAC;gBACN,KAAK,IAAI,CAAC,CAAC;YACb,CAAC;QACH,CAAC;;YAAM,KAAK,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FTRUMContext } from './types.js';
|
|
2
|
-
export interface FTReplayImageRecord {
|
|
3
|
-
context: FTRUMContext;
|
|
4
|
-
resourceId: string;
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
mimeType?: `image/${string}`;
|
|
8
|
-
timestamp: number;
|
|
9
|
-
contextChanged: boolean;
|
|
10
|
-
pointerEvents?: FTReplayPointerRecord[];
|
|
11
|
-
}
|
|
12
|
-
export interface FTReplayPointerRecord {
|
|
13
|
-
eventType: 'down' | 'up' | 'move';
|
|
14
|
-
pointerId: number;
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
timestamp: number;
|
|
18
|
-
}
|
|
19
|
-
export interface FTReplayPointerRecords {
|
|
20
|
-
context: FTRUMContext;
|
|
21
|
-
pointerEvents: FTReplayPointerRecord[];
|
|
22
|
-
}
|
|
23
|
-
export declare function encodeReplayImageRecord(input: FTReplayImageRecord): {
|
|
24
|
-
segment: string;
|
|
25
|
-
recordCount: number;
|
|
26
|
-
};
|
|
27
|
-
export declare function encodeReplayPointerRecords(input: FTReplayPointerRecords): {
|
|
28
|
-
segment: string;
|
|
29
|
-
recordCount: number;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=replay-encoding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-encoding.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-encoding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,YAAY,CAAC;IACtB,aAAa,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,mBAAmB,GAAG;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAiCA;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,sBAAsB,GAAG;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAMA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.encodeReplayImageRecord = encodeReplayImageRecord;
|
|
15
|
-
exports.encodeReplayPointerRecords = encodeReplayPointerRecords;
|
|
16
|
-
function encodeReplayImageRecord(input) {
|
|
17
|
-
var _a;
|
|
18
|
-
var wireframe = __assign(__assign({ id: 1, type: 'image', x: 0, y: 0, width: input.width, height: input.height, base64: null, border: null, clip: null, isEmpty: false }, (input.mimeType ? { mimeType: input.mimeType } : {})), { resourceId: input.resourceId, shapeStyle: null });
|
|
19
|
-
var records = [];
|
|
20
|
-
if (input.contextChanged) {
|
|
21
|
-
records.push({ type: 4, data: { width: input.width, height: input.height }, timestamp: input.timestamp }, { type: 6, data: { has_focus: true }, timestamp: input.timestamp });
|
|
22
|
-
}
|
|
23
|
-
records.push({
|
|
24
|
-
type: 10,
|
|
25
|
-
data: { wireframes: [wireframe] },
|
|
26
|
-
timestamp: input.timestamp,
|
|
27
|
-
});
|
|
28
|
-
records.push.apply(records, ((_a = input.pointerEvents) === null || _a === void 0 ? void 0 : _a.map(pointerRecord)) || []);
|
|
29
|
-
return {
|
|
30
|
-
segment: encodeEnvelope(input.context, records),
|
|
31
|
-
recordCount: records.length,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function encodeReplayPointerRecords(input) {
|
|
35
|
-
var records = input.pointerEvents.map(pointerRecord);
|
|
36
|
-
return {
|
|
37
|
-
segment: encodeEnvelope(input.context, records),
|
|
38
|
-
recordCount: records.length,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function pointerRecord(pointer) {
|
|
42
|
-
return {
|
|
43
|
-
type: 11,
|
|
44
|
-
data: {
|
|
45
|
-
source: 9,
|
|
46
|
-
pointerEventType: pointer.eventType,
|
|
47
|
-
pointerType: 'touch',
|
|
48
|
-
pointerId: pointer.pointerId,
|
|
49
|
-
x: pointer.x,
|
|
50
|
-
y: pointer.y,
|
|
51
|
-
},
|
|
52
|
-
timestamp: pointer.timestamp,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function encodeEnvelope(context, records) {
|
|
56
|
-
return JSON.stringify({
|
|
57
|
-
records: records,
|
|
58
|
-
applicationID: context.applicationId,
|
|
59
|
-
sessionID: context.sessionId,
|
|
60
|
-
viewID: context.viewId,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=replay-encoding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-encoding.js","sourceRoot":"","sources":["../../../../../src/core/replay-encoding.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA0BA,0DAoCC;AAED,gEASC;AA/CD,SAAgB,uBAAuB,CAAC,KAA0B;;IAIhE,IAAM,SAAS,uBACb,EAAE,EAAE,CAAC,EACL,IAAI,EAAE,OAAO,EACb,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,KAAK,IACX,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACvD,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,UAAU,EAAE,IAAI,GACjB,CAAC;IACF,IAAM,OAAO,GAAc,EAAE,CAAC;IAC9B,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CACV,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,K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AAE,OAAO,CAAC,SAAS;KAC7B,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,OAAqB,EAAE,OAAkB;IAC/D,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,OAAO,SAAA;QACP,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { FTCapturedFrame, FTStoredFrame } from './types.js';
|
|
2
|
-
/** Copies pixels into native-owned memory; all file operations run off the game thread. */
|
|
3
|
-
export declare function persistReplayFrame(frame: FTCapturedFrame, fingerprint: string, writablePath: string): Promise<FTStoredFrame>;
|
|
4
|
-
export declare function disposeReplayFrame(frame: FTStoredFrame): Promise<void>;
|
|
5
|
-
//# sourceMappingURL=replay-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-file.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAwBjE,2FAA2F;AAC3F,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CAKxB;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5E"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.persistReplayFrame = persistReplayFrame;
|
|
40
|
-
exports.disposeReplayFrame = disposeReplayFrame;
|
|
41
|
-
var sequence = 0;
|
|
42
|
-
function bridge() {
|
|
43
|
-
var value = globalThis.__ftCocosReplayFile;
|
|
44
|
-
if (!value)
|
|
45
|
-
throw new Error('Rebuild the native project with the Cocos SDK extension to enable asynchronous Replay storage');
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
function waitForFile(expected) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
var status_1;
|
|
51
|
-
return __generator(this, function (_a) {
|
|
52
|
-
switch (_a.label) {
|
|
53
|
-
case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 16); })];
|
|
54
|
-
case 1:
|
|
55
|
-
_a.sent();
|
|
56
|
-
status_1 = bridge().poll();
|
|
57
|
-
if (status_1 === expected)
|
|
58
|
-
return [2 /*return*/];
|
|
59
|
-
if (status_1 !== 'pending')
|
|
60
|
-
throw new Error("Replay file operation failed: ".concat(status_1));
|
|
61
|
-
_a.label = 2;
|
|
62
|
-
case 2: return [3 /*break*/, 0];
|
|
63
|
-
case 3: return [2 /*return*/];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/** Copies pixels into native-owned memory; all file operations run off the game thread. */
|
|
69
|
-
function persistReplayFrame(frame, fingerprint, writablePath) {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
var path;
|
|
72
|
-
return __generator(this, function (_a) {
|
|
73
|
-
switch (_a.label) {
|
|
74
|
-
case 0:
|
|
75
|
-
path = "".concat(writablePath, "cocos-sdk-replay-").concat(Date.now(), "-").concat(++sequence, "-").concat(fingerprint, ".rgba");
|
|
76
|
-
if (!bridge().write(frame.rgba, path))
|
|
77
|
-
throw new Error('Replay file writer is busy');
|
|
78
|
-
return [4 /*yield*/, waitForFile('written')];
|
|
79
|
-
case 1:
|
|
80
|
-
_a.sent();
|
|
81
|
-
return [2 /*return*/, { path: path, width: frame.width, height: frame.height, timestamp: frame.timestamp, fingerprint: fingerprint }];
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function disposeReplayFrame(frame) {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0:
|
|
91
|
-
if (!bridge().remove(frame.path))
|
|
92
|
-
throw new Error('Replay file writer is busy or the frame has expired');
|
|
93
|
-
return [4 /*yield*/, waitForFile('removed')];
|
|
94
|
-
case 1:
|
|
95
|
-
_a.sent();
|
|
96
|
-
return [2 /*return*/];
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=replay-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-file.js","sourceRoot":"","sources":["../../../../../src/core/replay-file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,gDASC;AAED,gDAGC;AA/BD,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAS,MAAM;IACb,IAAM,KAAK,GAAI,UAAsE,CAAC,mBAAmB,CAAC;IAC1G,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;IAC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C9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-pixels.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-pixels.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAUnF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flipRgbaRows = flipRgbaRows;
|
|
4
|
-
/** Converts tightly packed RGBA pixels from bottom-left to top-left row order. */
|
|
5
|
-
function flipRgbaRows(bytes, width, height) {
|
|
6
|
-
var rowSize = width * 4;
|
|
7
|
-
var swap = new Uint8Array(rowSize);
|
|
8
|
-
for (var top_1 = 0, bottom = height - 1; top_1 < bottom; top_1 += 1, bottom -= 1) {
|
|
9
|
-
var topOffset = top_1 * rowSize;
|
|
10
|
-
var bottomOffset = bottom * rowSize;
|
|
11
|
-
swap.set(bytes.subarray(topOffset, topOffset + rowSize));
|
|
12
|
-
bytes.copyWithin(topOffset, bottomOffset, bottomOffset + rowSize);
|
|
13
|
-
bytes.set(swap, bottomOffset);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=replay-pixels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-pixels.js","sourceRoot":"","sources":["../../../../../src/core/replay-pixels.ts"],"names":[],"mappings":";;AACA,oCAUC;AAXD,kFAAkF;AAClF,SAAgB,YAAY,CAAC,KAAiB,EAAE,KAAa,EAAE,MAAc;IAC3E,IAAM,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC;IAC1B,IAAM,IAAI,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IACrC,KAAK,IAAI,KAAG,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,KAAG,GAAG,MAAM,EAAE,KAAG,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC;QAC3E,IAAM,SAAS,GAAG,KAAG,GAAG,OAAO,CAAC;QAChC,IAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;QACtC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;QACzD,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC;QAClE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FTReplayPrivacyMode } from './types.js';
|
|
2
|
-
/** Shape of the ReplayPrivacy editor script installed in the project's assets. */
|
|
3
|
-
interface ReplayPrivacyComponent {
|
|
4
|
-
node: unknown;
|
|
5
|
-
enabledInHierarchy: boolean;
|
|
6
|
-
isValid: boolean;
|
|
7
|
-
readonly replayPrivacyMode: 'mask' | 'hide';
|
|
8
|
-
}
|
|
9
|
-
/** Resolve rules afresh for each capture, including newly instantiated prefabs. */
|
|
10
|
-
export declare function collectReplayPrivacyNodes(overrides: ReadonlyMap<unknown, FTReplayPrivacyMode>, components: ReplayPrivacyComponent[], editBoxes: {
|
|
11
|
-
node: unknown;
|
|
12
|
-
}[]): Map<unknown, FTReplayPrivacyMode>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=replay-privacy-nodes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-privacy-nodes.d.ts","sourceRoot":"","sources":["../../../../../src/core/replay-privacy-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,kFAAkF;AAClF,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7C;AAED,mFAAmF;AACnF,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,mBAAmB,CAAC,EACpD,UAAU,EAAE,sBAAsB,EAAE,EACpC,SAAS,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EAAE,GAC7B,GAAG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAUnC"}
|