@truewatchtech/cocos-sdk 0.1.0-alpha.4 → 0.1.0-alpha.7

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.
Files changed (181) hide show
  1. package/README.md +49 -1
  2. package/bin/cli.cjs +48 -18
  3. package/bin/legacy-asset-hashes.json +32 -0
  4. package/bin/managed-assets.cjs +67 -0
  5. package/dist/creator2/core/client.d.ts +55 -7
  6. package/dist/creator2/core/client.d.ts.map +1 -1
  7. package/dist/creator2/core/client.js +74 -28
  8. package/dist/creator2/core/client.js.map +1 -1
  9. package/dist/creator2/core/index.d.ts +1 -1
  10. package/dist/creator2/core/index.d.ts.map +1 -1
  11. package/dist/creator2/core/index.js.map +1 -1
  12. package/dist/creator2/core/plugin-api.d.ts +15 -0
  13. package/dist/creator2/core/plugin-api.d.ts.map +1 -0
  14. package/dist/creator2/core/plugin-api.js +3 -0
  15. package/dist/creator2/core/plugin-api.js.map +1 -0
  16. package/dist/creator2/core/transport.d.ts +20 -0
  17. package/dist/creator2/core/transport.d.ts.map +1 -1
  18. package/dist/creator2/core/transport.js.map +1 -1
  19. package/dist/creator2/core/types.d.ts +0 -78
  20. package/dist/creator2/core/types.d.ts.map +1 -1
  21. package/dist/creator2/core/validation.d.ts +0 -11
  22. package/dist/creator2/core/validation.d.ts.map +1 -1
  23. package/dist/creator2/core/validation.js +0 -63
  24. package/dist/creator2/core/validation.js.map +1 -1
  25. package/dist/creator2/core/version.d.ts +1 -1
  26. package/dist/creator2/core/version.js +1 -1
  27. package/dist/creator2/creator2/auto.d.ts +1 -3
  28. package/dist/creator2/creator2/auto.d.ts.map +1 -1
  29. package/dist/creator2/creator2/auto.js +0 -25
  30. package/dist/creator2/creator2/auto.js.map +1 -1
  31. package/dist/creator2/creator2/index.d.ts +0 -7
  32. package/dist/creator2/creator2/index.d.ts.map +1 -1
  33. package/dist/creator2/creator2/index.js +1 -13
  34. package/dist/creator2/creator2/index.js.map +1 -1
  35. package/dist/creator2/creator2/transport.d.ts +0 -1
  36. package/dist/creator2/creator2/transport.d.ts.map +1 -1
  37. package/dist/creator2/creator2/transport.js +0 -4
  38. package/dist/creator2/creator2/transport.js.map +1 -1
  39. package/dist/creator3/core/client.d.ts +55 -7
  40. package/dist/creator3/core/client.d.ts.map +1 -1
  41. package/dist/creator3/core/client.js +72 -28
  42. package/dist/creator3/core/client.js.map +1 -1
  43. package/dist/creator3/core/index.d.ts +1 -1
  44. package/dist/creator3/core/index.d.ts.map +1 -1
  45. package/dist/creator3/core/index.js.map +1 -1
  46. package/dist/creator3/core/plugin-api.d.ts +15 -0
  47. package/dist/creator3/core/plugin-api.d.ts.map +1 -0
  48. package/dist/creator3/core/plugin-api.js +2 -0
  49. package/dist/creator3/core/plugin-api.js.map +1 -0
  50. package/dist/creator3/core/transport.d.ts +20 -0
  51. package/dist/creator3/core/transport.d.ts.map +1 -1
  52. package/dist/creator3/core/transport.js.map +1 -1
  53. package/dist/creator3/core/types.d.ts +0 -78
  54. package/dist/creator3/core/types.d.ts.map +1 -1
  55. package/dist/creator3/core/validation.d.ts +0 -11
  56. package/dist/creator3/core/validation.d.ts.map +1 -1
  57. package/dist/creator3/core/validation.js +0 -61
  58. package/dist/creator3/core/validation.js.map +1 -1
  59. package/dist/creator3/core/version.d.ts +1 -1
  60. package/dist/creator3/core/version.js +1 -1
  61. package/dist/creator3/creator3/auto.d.ts +1 -3
  62. package/dist/creator3/creator3/auto.d.ts.map +1 -1
  63. package/dist/creator3/creator3/auto.js +1 -24
  64. package/dist/creator3/creator3/auto.js.map +1 -1
  65. package/dist/creator3/creator3/index.d.ts +0 -7
  66. package/dist/creator3/creator3/index.d.ts.map +1 -1
  67. package/dist/creator3/creator3/index.js +1 -12
  68. package/dist/creator3/creator3/index.js.map +1 -1
  69. package/dist/creator3/creator3/transport.d.ts +0 -1
  70. package/dist/creator3/creator3/transport.d.ts.map +1 -1
  71. package/dist/creator3/creator3/transport.js +0 -4
  72. package/dist/creator3/creator3/transport.js.map +1 -1
  73. package/extensions/creator2/install-native.cjs +118 -28
  74. package/extensions/creator2/install-spm.cjs +198 -0
  75. package/extensions/creator2/legacy-asset-hashes.json +32 -0
  76. package/extensions/creator2/managed-assets.cjs +67 -0
  77. package/extensions/creator3/install-native.cjs +118 -28
  78. package/extensions/creator3/install-spm.cjs +198 -0
  79. package/extensions/creator3/legacy-asset-hashes.json +32 -0
  80. package/extensions/creator3/managed-assets.cjs +67 -0
  81. package/native/android/src/main/java/com/ft/sdk/cocos/FTBridgeTransport.java +85 -0
  82. package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridge.java +2 -192
  83. package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridgeModules.java +9 -0
  84. package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosBridgeProvider.java +1 -1
  85. package/native/ios/FTCocosBridge.m +8 -203
  86. package/native/ios/FTCocosBridge.podspec +3 -4
  87. package/native/ios/Package.swift +25 -0
  88. package/native/ios/include/FTCocosBridge.h +2 -0
  89. package/package.json +10 -5
  90. package/plugin-api/package.json +4 -0
  91. package/components/creator2/ReplayPrivacy.ts +0 -23
  92. package/components/creator3/ReplayPrivacy.ts +0 -25
  93. package/dist/creator2/core/replay-async-transport.d.ts +0 -4
  94. package/dist/creator2/core/replay-async-transport.d.ts.map +0 -1
  95. package/dist/creator2/core/replay-async-transport.js +0 -67
  96. package/dist/creator2/core/replay-async-transport.js.map +0 -1
  97. package/dist/creator2/core/replay-budget.d.ts +0 -28
  98. package/dist/creator2/core/replay-budget.d.ts.map +0 -1
  99. package/dist/creator2/core/replay-budget.js +0 -113
  100. package/dist/creator2/core/replay-budget.js.map +0 -1
  101. package/dist/creator2/core/replay-diagnostics.d.ts +0 -36
  102. package/dist/creator2/core/replay-diagnostics.d.ts.map +0 -1
  103. package/dist/creator2/core/replay-diagnostics.js +0 -40
  104. package/dist/creator2/core/replay-diagnostics.js.map +0 -1
  105. package/dist/creator2/core/replay-encoding.d.ts +0 -31
  106. package/dist/creator2/core/replay-encoding.d.ts.map +0 -1
  107. package/dist/creator2/core/replay-encoding.js +0 -63
  108. package/dist/creator2/core/replay-encoding.js.map +0 -1
  109. package/dist/creator2/core/replay-file.d.ts +0 -5
  110. package/dist/creator2/core/replay-file.d.ts.map +0 -1
  111. package/dist/creator2/core/replay-file.js +0 -101
  112. package/dist/creator2/core/replay-file.js.map +0 -1
  113. package/dist/creator2/core/replay-pixels.d.ts +0 -3
  114. package/dist/creator2/core/replay-pixels.d.ts.map +0 -1
  115. package/dist/creator2/core/replay-pixels.js +0 -16
  116. package/dist/creator2/core/replay-pixels.js.map +0 -1
  117. package/dist/creator2/core/replay-privacy-nodes.d.ts +0 -14
  118. package/dist/creator2/core/replay-privacy-nodes.d.ts.map +0 -1
  119. package/dist/creator2/core/replay-privacy-nodes.js +0 -18
  120. package/dist/creator2/core/replay-privacy-nodes.js.map +0 -1
  121. package/dist/creator2/core/replay-privacy.d.ts +0 -15
  122. package/dist/creator2/core/replay-privacy.d.ts.map +0 -1
  123. package/dist/creator2/core/replay-privacy.js +0 -36
  124. package/dist/creator2/core/replay-privacy.js.map +0 -1
  125. package/dist/creator2/core/replay.d.ts +0 -99
  126. package/dist/creator2/core/replay.d.ts.map +0 -1
  127. package/dist/creator2/core/replay.js +0 -611
  128. package/dist/creator2/core/replay.js.map +0 -1
  129. package/dist/creator2/creator2/capture.d.ts +0 -17
  130. package/dist/creator2/creator2/capture.d.ts.map +0 -1
  131. package/dist/creator2/creator2/capture.js +0 -168
  132. package/dist/creator2/creator2/capture.js.map +0 -1
  133. package/dist/creator3/core/replay-async-transport.d.ts +0 -4
  134. package/dist/creator3/core/replay-async-transport.d.ts.map +0 -1
  135. package/dist/creator3/core/replay-async-transport.js +0 -16
  136. package/dist/creator3/core/replay-async-transport.js.map +0 -1
  137. package/dist/creator3/core/replay-budget.d.ts +0 -28
  138. package/dist/creator3/core/replay-budget.d.ts.map +0 -1
  139. package/dist/creator3/core/replay-budget.js +0 -105
  140. package/dist/creator3/core/replay-budget.js.map +0 -1
  141. package/dist/creator3/core/replay-diagnostics.d.ts +0 -36
  142. package/dist/creator3/core/replay-diagnostics.d.ts.map +0 -1
  143. package/dist/creator3/core/replay-diagnostics.js +0 -36
  144. package/dist/creator3/core/replay-diagnostics.js.map +0 -1
  145. package/dist/creator3/core/replay-encoding.d.ts +0 -31
  146. package/dist/creator3/core/replay-encoding.d.ts.map +0 -1
  147. package/dist/creator3/core/replay-encoding.js +0 -62
  148. package/dist/creator3/core/replay-encoding.js.map +0 -1
  149. package/dist/creator3/core/replay-file.d.ts +0 -5
  150. package/dist/creator3/core/replay-file.d.ts.map +0 -1
  151. package/dist/creator3/core/replay-file.js +0 -31
  152. package/dist/creator3/core/replay-file.js.map +0 -1
  153. package/dist/creator3/core/replay-pixels.d.ts +0 -3
  154. package/dist/creator3/core/replay-pixels.d.ts.map +0 -1
  155. package/dist/creator3/core/replay-pixels.js +0 -13
  156. package/dist/creator3/core/replay-pixels.js.map +0 -1
  157. package/dist/creator3/core/replay-privacy-nodes.d.ts +0 -14
  158. package/dist/creator3/core/replay-privacy-nodes.d.ts.map +0 -1
  159. package/dist/creator3/core/replay-privacy-nodes.js +0 -15
  160. package/dist/creator3/core/replay-privacy-nodes.js.map +0 -1
  161. package/dist/creator3/core/replay-privacy.d.ts +0 -15
  162. package/dist/creator3/core/replay-privacy.d.ts.map +0 -1
  163. package/dist/creator3/core/replay-privacy.js +0 -33
  164. package/dist/creator3/core/replay-privacy.js.map +0 -1
  165. package/dist/creator3/core/replay.d.ts +0 -99
  166. package/dist/creator3/core/replay.d.ts.map +0 -1
  167. package/dist/creator3/core/replay.js +0 -534
  168. package/dist/creator3/core/replay.js.map +0 -1
  169. package/dist/creator3/creator3/capture.d.ts +0 -17
  170. package/dist/creator3/creator3/capture.d.ts.map +0 -1
  171. package/dist/creator3/creator3/capture.js +0 -112
  172. package/dist/creator3/creator3/capture.js.map +0 -1
  173. package/dist/creator3/creator3/replay-render-cycle.d.ts +0 -9
  174. package/dist/creator3/creator3/replay-render-cycle.d.ts.map +0 -1
  175. package/dist/creator3/creator3/replay-render-cycle.js +0 -12
  176. package/dist/creator3/creator3/replay-render-cycle.js.map +0 -1
  177. package/native/android/src/main/java/com/ft/sdk/cocos/FTCocosReplayImageJobs.java +0 -55
  178. package/native/ios/FTCocosReplayImageJobs.h +0 -11
  179. package/native/ios/FTCocosReplayImageJobs.m +0 -54
  180. package/native/shared/FTReplayFileBridge.h +0 -62
  181. package/native/shared/FTReplayFileWorker.h +0 -88
@@ -1,534 +0,0 @@
1
- import { encodeReplayImageRecord, encodeReplayPointerRecords, } from './replay-encoding.js';
2
- import { FTReplayBudget } from './replay-budget.js';
3
- import { emitReplayDiagnostic, replayUtf8ByteLength } from './replay-diagnostics.js';
4
- import { captureFps, replayImagePolicy, samplingRate, } from './validation.js';
5
- const MAX_PENDING_POINTER_EVENTS = 512;
6
- /** Cocos canvas Session Replay controls. */
7
- export class FTSessionReplay {
8
- constructor(transport, capture, pointerSource) {
9
- this.transport = transport;
10
- this.capture = capture;
11
- this.pointerSource = pointerSource;
12
- this.busy = false;
13
- this.running = false;
14
- this.mode = 'idle';
15
- this.hybridReplayEnabled = false;
16
- this.captureGeneration = 0;
17
- this.config = { captureFps: 1 };
18
- this.imagePolicy = replayImagePolicy({});
19
- this.budget = new FTReplayBudget(this.imagePolicy);
20
- this.imagePolicyEnabled = false;
21
- this.recordCounts = new Map();
22
- this.recordTouches = false;
23
- this.pendingPointerEvents = [];
24
- }
25
- /**
26
- * Enables native Session Replay and starts Cocos canvas capture for a
27
- * standalone application.
28
- *
29
- * @param config - Replay sampling, capture, and touch-privacy settings.
30
- */
31
- start(config = {}) {
32
- if (this.mode === 'hybrid') {
33
- throw new Error('Hybrid Replay is managed by enterCocos() and leaveCocos()');
34
- }
35
- if (this.mode === 'standalone')
36
- return;
37
- samplingRate(config.sampleRate, 'replay.sampleRate');
38
- samplingRate(config.sessionOnErrorSampleRate, 'replay.sessionOnErrorSampleRate');
39
- this.configureCapture(config);
40
- this.transport.invoke('replay.configure', config);
41
- this.mode = 'standalone';
42
- this.startCapture();
43
- }
44
- /** @internal */
45
- attachHybrid(config) {
46
- if (this.mode === 'standalone') {
47
- throw new Error('Standalone Replay and Hybrid Replay are mutually exclusive');
48
- }
49
- if (this.mode === 'hybrid')
50
- return;
51
- this.configureCapture(config || {});
52
- this.hybridReplayEnabled = config !== undefined;
53
- this.mode = 'hybrid';
54
- }
55
- /** @internal */
56
- detachHybrid() {
57
- if (this.mode !== 'hybrid')
58
- return;
59
- this.stopCapture();
60
- this.hybridReplayEnabled = false;
61
- this.mode = 'idle';
62
- }
63
- /** @internal */
64
- enterHybrid() {
65
- if (this.mode !== 'hybrid') {
66
- throw new Error('Call attach() before entering Hybrid Replay');
67
- }
68
- if (!this.hybridReplayEnabled || this.running)
69
- return;
70
- this.transport.invoke('hybrid.setExternalRecorderActive', { active: true });
71
- this.startCapture();
72
- }
73
- /** @internal */
74
- leaveHybrid() {
75
- if (this.mode !== 'hybrid' || !this.hybridReplayEnabled)
76
- return;
77
- this.stopCapture();
78
- this.transport.invoke('hybrid.setExternalRecorderActive', { active: false });
79
- }
80
- configureCapture(config) {
81
- if (config.touchPrivacy !== undefined && config.touchPrivacy !== 'show' && config.touchPrivacy !== 'hide') {
82
- throw new TypeError("touchPrivacy must be either 'show' or 'hide'");
83
- }
84
- this.config = { captureFps: captureFps(config.captureFps) };
85
- this.imagePolicy = replayImagePolicy(config);
86
- this.budget = new FTReplayBudget(this.imagePolicy);
87
- // Lossy image MIME must be validated against the deployed player before
88
- // becoming an implicit default. Supplying imagePolicy opts into V2 now.
89
- this.imagePolicyEnabled = config.imagePolicy !== undefined;
90
- this.recordTouches = config.touchPrivacy === 'show';
91
- }
92
- /** Stops standalone Cocos canvas capture and native Session Replay. */
93
- stop() {
94
- if (this.mode === 'hybrid') {
95
- throw new Error('Hybrid Replay is managed by enterCocos() and leaveCocos()');
96
- }
97
- if (this.mode === 'idle')
98
- return;
99
- this.stopCapture();
100
- this.transport.invoke('replay.stop');
101
- this.mode = 'idle';
102
- }
103
- /**
104
- * Changes the Session Replay privacy treatment for a Cocos node.
105
- *
106
- * `mask` obscures the node, `hide` removes the region from the replay, and
107
- * `unmask` clears an earlier code override, restoring any ReplayPrivacy
108
- * component rule or default input masking. Code overrides take priority over
109
- * a component on the same node. The node must belong to the active Cocos scene.
110
- *
111
- * @param node - Cocos node whose rendered bounds receive the privacy rule.
112
- * @param mode - Privacy treatment to apply.
113
- */
114
- setPrivacy(node, mode) {
115
- this.capture.setPrivacy(node, mode);
116
- }
117
- /** @internal */
118
- async captureNow() {
119
- var _a, _b;
120
- if (this.busy) {
121
- emitReplayDiagnostic({ type: 'capture_skipped', timestamp: Date.now(), reason: 'busy' });
122
- return false;
123
- }
124
- const generation = this.captureGeneration;
125
- this.busy = true;
126
- let stored;
127
- let context;
128
- let pointerSize = this.lastImageSize;
129
- try {
130
- context = this.readContext();
131
- if (!context)
132
- return false;
133
- const contextKey = `${context.applicationId}:${context.sessionId}:${context.viewId}`;
134
- const contextChanged = contextKey !== this.lastContextKey;
135
- const viewportSize = (_b = (_a = this.capture).getViewportSize) === null || _b === void 0 ? void 0 : _b.call(_a);
136
- const viewportChanged = this.lastViewportSize !== undefined
137
- && viewportSize !== undefined
138
- && (viewportSize.width !== this.lastViewportSize.width
139
- || viewportSize.height !== this.lastViewportSize.height);
140
- const priorityKey = contextChanged
141
- ? contextKey
142
- : viewportChanged && viewportSize
143
- ? `${contextKey}:${viewportSize.width}x${viewportSize.height}`
144
- : undefined;
145
- const now = Date.now();
146
- const decision = this.budget.decide(now, priorityKey);
147
- emitReplayDiagnostic({
148
- type: 'capture_attempt',
149
- timestamp: now,
150
- usedBytes: decision.usedBytes,
151
- maxBytesPerMinute: this.imagePolicy.maxBytesPerMinute,
152
- });
153
- if (!decision.allowed) {
154
- emitReplayDiagnostic({
155
- type: 'capture_skipped',
156
- timestamp: now,
157
- reason: decision.reason || 'budget',
158
- });
159
- return pointerSize ? this.writePendingPointers(context, pointerSize.width, pointerSize.height) : false;
160
- }
161
- const frame = await this.capture.capture(decision.maxImageDimension);
162
- if (generation !== this.captureGeneration)
163
- return false;
164
- if (!frame)
165
- return false;
166
- pointerSize = { width: frame.width, height: frame.height };
167
- applyPrivacyRegions(frame.rgba, frame.width, frame.height, frame.privacyRegions || []);
168
- const fingerprint = frameFingerprint(frame.rgba);
169
- const privacyKey = privacyRegionsKey(frame.privacyRegions || []);
170
- const sample = sampleReplayFrame(frame.rgba, frame.width, frame.height);
171
- const comparable = contextKey === this.lastContextKey
172
- && !viewportChanged
173
- && privacyKey === this.lastPrivacyKey;
174
- const duplicate = comparable && fingerprint === this.lastFingerprint;
175
- const approximatelyStatic = comparable
176
- && !duplicate
177
- && replayFramesLookSimilar(this.lastFrameSample, sample);
178
- if (duplicate || approximatelyStatic) {
179
- emitReplayDiagnostic({
180
- type: 'capture_skipped',
181
- timestamp: now,
182
- reason: duplicate ? 'dedupe' : 'approx_static',
183
- });
184
- return this.writePendingPointers(context, frame.width, frame.height);
185
- }
186
- stored = await this.capture.persist(frame, fingerprint);
187
- if (generation !== this.captureGeneration)
188
- return false;
189
- const saved = await this.saveImage(stored, decision.compressionQuality, decision.maxFrameBytes);
190
- if (generation !== this.captureGeneration)
191
- return false;
192
- if (!saved) {
193
- emitReplayDiagnostic({ type: 'capture_skipped', timestamp: now, reason: 'budget' });
194
- return this.writePendingPointers(context, frame.width, frame.height);
195
- }
196
- const pendingPointers = this.scaledPendingPointers(saved.width, saved.height);
197
- const encoded = encodeReplayImageRecord({
198
- context,
199
- resourceId: saved.resourceId,
200
- width: saved.width,
201
- height: saved.height,
202
- ...(saved.mimeType ? { mimeType: saved.mimeType } : {}),
203
- timestamp: stored.timestamp,
204
- contextChanged,
205
- pointerEvents: pendingPointers,
206
- });
207
- this.transport.invoke('replay.writeSegment', {
208
- viewId: context.viewId,
209
- segment: encoded.segment,
210
- });
211
- emitReplayDiagnostic({
212
- type: 'segment_encoded',
213
- timestamp: now,
214
- byteSize: replayUtf8ByteLength(encoded.segment),
215
- recordCount: encoded.recordCount,
216
- pointerRecordCount: pendingPointers.length,
217
- hasImage: true,
218
- });
219
- this.updateRecordCount(context.viewId, encoded.recordCount);
220
- this.pendingPointerEvents.splice(0, pendingPointers.length);
221
- this.budget.record(now, saved.byteSize, priorityKey);
222
- emitReplayDiagnostic({
223
- type: 'image_saved',
224
- timestamp: now,
225
- byteSize: saved.byteSize,
226
- width: saved.width,
227
- height: saved.height,
228
- ...(saved.mimeType ? { mimeType: saved.mimeType } : {}),
229
- priority: decision.priority,
230
- byteSizeSource: saved.byteSizeSource,
231
- });
232
- this.lastFingerprint = fingerprint;
233
- this.lastContextKey = contextKey;
234
- this.lastPrivacyKey = privacyKey;
235
- this.lastFrameSample = sample;
236
- this.lastImageSize = { width: saved.width, height: saved.height };
237
- this.lastViewportSize = viewportSize;
238
- return true;
239
- }
240
- catch (error) {
241
- if (generation !== this.captureGeneration)
242
- return false;
243
- emitReplayDiagnostic({ type: 'capture_skipped', timestamp: Date.now(), reason: 'error' });
244
- console.error('[cocos-sdk] Session Replay frame dropped:', error);
245
- if (context && pointerSize) {
246
- try {
247
- return this.writePendingPointers(context, pointerSize.width, pointerSize.height);
248
- }
249
- catch (pointerError) {
250
- console.error('[cocos-sdk] Session Replay pointer segment dropped:', pointerError);
251
- }
252
- }
253
- return false;
254
- }
255
- finally {
256
- try {
257
- if (stored)
258
- await this.capture.disposeStoredFrame(stored);
259
- }
260
- finally {
261
- this.busy = false;
262
- }
263
- }
264
- }
265
- startCapture() {
266
- this.captureGeneration += 1;
267
- this.running = true;
268
- this.lastFingerprint = undefined;
269
- this.lastContextKey = undefined;
270
- this.lastPrivacyKey = undefined;
271
- this.lastFrameSample = undefined;
272
- this.lastImageSize = undefined;
273
- this.lastViewportSize = undefined;
274
- this.budget.reset();
275
- this.recordCounts.clear();
276
- this.pendingPointerEvents = [];
277
- if (this.recordTouches && this.pointerSource) {
278
- this.stopPointerTracking = this.pointerSource.onReplayPointer((event) => {
279
- emitReplayDiagnostic({
280
- type: 'pointer_received',
281
- timestamp: event.timestamp,
282
- eventType: event.eventType,
283
- });
284
- this.pendingPointerEvents.push(event);
285
- if (this.pendingPointerEvents.length > MAX_PENDING_POINTER_EVENTS) {
286
- this.pendingPointerEvents.splice(0, this.pendingPointerEvents.length - MAX_PENDING_POINTER_EVENTS);
287
- }
288
- });
289
- }
290
- this.schedule(0, this.captureGeneration);
291
- }
292
- stopCapture() {
293
- var _a;
294
- const wasRunning = this.running;
295
- this.captureGeneration += 1;
296
- this.running = false;
297
- (_a = this.stopPointerTracking) === null || _a === void 0 ? void 0 : _a.call(this);
298
- this.stopPointerTracking = undefined;
299
- this.pendingPointerEvents = [];
300
- if (this.timer !== undefined)
301
- clearTimeout(this.timer);
302
- this.timer = undefined;
303
- if (wasRunning)
304
- emitReplayDiagnostic({ type: 'replay_stopped', timestamp: Date.now() });
305
- }
306
- schedule(delay, generation) {
307
- if (!this.running)
308
- return;
309
- this.timer = setTimeout(async () => {
310
- if (!this.running || generation !== this.captureGeneration)
311
- return;
312
- try {
313
- await this.captureNow();
314
- }
315
- catch (error) {
316
- console.error('[cocos-sdk] Session Replay frame dropped:', error);
317
- }
318
- finally {
319
- if (this.running && generation === this.captureGeneration) {
320
- this.schedule(1000 / this.config.captureFps, generation);
321
- }
322
- }
323
- }, delay);
324
- }
325
- readContext() {
326
- const value = this.transport.invoke('replay.getContext');
327
- return normalizeRumContext(value);
328
- }
329
- async saveImage(stored, compressionQuality, maxFrameBytes) {
330
- if (this.imagePolicyEnabled && this.supportsSaveImageV2 !== false) {
331
- try {
332
- const value = await this.invokeSaveImage('replay.saveImageV2', {
333
- path: stored.path,
334
- width: stored.width,
335
- height: stored.height,
336
- quality: compressionQuality,
337
- maxFrameBytes,
338
- });
339
- if (value !== undefined) {
340
- this.supportsSaveImageV2 = true;
341
- if (isRejectedSaveImageV2(value))
342
- return undefined;
343
- return { ...normalizeSaveImageV2Result(value), byteSizeSource: 'native' };
344
- }
345
- this.supportsSaveImageV2 = false;
346
- }
347
- catch (error) {
348
- if (!isUnknownBridgeMethod(error))
349
- throw error;
350
- this.supportsSaveImageV2 = false;
351
- }
352
- }
353
- const resourceId = await this.invokeSaveImage('replay.saveImage', {
354
- path: stored.path,
355
- width: stored.width,
356
- height: stored.height,
357
- });
358
- if (!resourceId)
359
- return undefined;
360
- return {
361
- resourceId,
362
- // V1 cannot report encoded size. A conservative frame-limit estimate
363
- // still prevents configured captureFps from multiplying traffic freely.
364
- byteSize: maxFrameBytes,
365
- width: stored.width,
366
- height: stored.height,
367
- byteSizeSource: 'frame_limit_estimate',
368
- ...(this.transport.platform === 'ios' ? { mimeType: 'image/png' } : {}),
369
- };
370
- }
371
- invokeSaveImage(method, payload) {
372
- return this.transport.invokeAsync
373
- ? this.transport.invokeAsync(method, payload)
374
- : Promise.resolve(this.transport.invoke(method, payload));
375
- }
376
- writePendingPointers(context, width, height) {
377
- const pointerEvents = this.scaledPendingPointers(width, height);
378
- if (pointerEvents.length === 0)
379
- return false;
380
- const encoded = encodeReplayPointerRecords({ context, pointerEvents });
381
- this.transport.invoke('replay.writeSegment', {
382
- viewId: context.viewId,
383
- segment: encoded.segment,
384
- });
385
- emitReplayDiagnostic({
386
- type: 'segment_encoded',
387
- timestamp: Date.now(),
388
- byteSize: replayUtf8ByteLength(encoded.segment),
389
- recordCount: encoded.recordCount,
390
- pointerRecordCount: pointerEvents.length,
391
- hasImage: false,
392
- });
393
- this.updateRecordCount(context.viewId, encoded.recordCount);
394
- this.pendingPointerEvents.splice(0, pointerEvents.length);
395
- return true;
396
- }
397
- scaledPendingPointers(width, height) {
398
- return this.pendingPointerEvents.map((event) => ({
399
- eventType: event.eventType,
400
- pointerId: event.pointerId,
401
- x: Math.round(clamp(event.normalizedX, 0, 1) * width),
402
- y: Math.round(clamp(event.normalizedY, 0, 1) * height),
403
- timestamp: event.timestamp,
404
- }));
405
- }
406
- updateRecordCount(viewId, added) {
407
- const count = (this.recordCounts.get(viewId) || 0) + added;
408
- this.recordCounts.set(viewId, count);
409
- this.transport.invoke('replay.setRecordCount', { viewId, count });
410
- }
411
- }
412
- function normalizeRumContext(value) {
413
- if (!value || typeof value !== 'object')
414
- return undefined;
415
- const context = value;
416
- const applicationId = stringValue(context.applicationId, context.application_id);
417
- const sessionId = stringValue(context.sessionId, context.session_id);
418
- const viewId = stringValue(context.viewId, context.view_id);
419
- if (!applicationId || !sessionId || !viewId)
420
- return undefined;
421
- const globalContext = context.globalContext;
422
- return {
423
- applicationId,
424
- sessionId,
425
- viewId,
426
- ...(globalContext && typeof globalContext === 'object'
427
- ? { globalContext: globalContext }
428
- : {}),
429
- };
430
- }
431
- function stringValue(...values) {
432
- return values.find((value) => typeof value === 'string' && value.length > 0);
433
- }
434
- export function normalizeSaveImageV2Result(value) {
435
- if (!value || typeof value !== 'object')
436
- throw new TypeError('Invalid replay.saveImageV2 result');
437
- const result = value;
438
- const resourceId = stringValue(result.resourceId, result.resource_id);
439
- const byteSize = numberValue(result.byteSize, result.byte_size);
440
- const width = numberValue(result.width);
441
- const height = numberValue(result.height);
442
- const mimeType = stringValue(result.mimeType, result.mime_type);
443
- if (!resourceId || !isPositiveInteger(byteSize) || !isPositiveInteger(width) || !isPositiveInteger(height)) {
444
- throw new TypeError('Invalid replay.saveImageV2 result');
445
- }
446
- if (mimeType && !mimeType.startsWith('image/')) {
447
- throw new TypeError('Invalid replay.saveImageV2 mimeType');
448
- }
449
- return {
450
- resourceId,
451
- byteSize,
452
- width,
453
- height,
454
- ...(mimeType ? { mimeType: mimeType } : {}),
455
- };
456
- }
457
- function isRejectedSaveImageV2(value) {
458
- return typeof value === 'object' && value !== null && value.accepted === false;
459
- }
460
- function isUnknownBridgeMethod(error) {
461
- return error instanceof Error && /unknown bridge method|unrecognized selector/i.test(error.message);
462
- }
463
- function numberValue(...values) {
464
- return values.find((value) => typeof value === 'number' && Number.isFinite(value));
465
- }
466
- function isPositiveInteger(value) {
467
- return value !== undefined && Number.isInteger(value) && value > 0;
468
- }
469
- export function sampleReplayFrame(rgba, width, height, maximumSamples = 4096) {
470
- const pixelCount = width * height;
471
- if (width < 1 || height < 1 || rgba.length < pixelCount * 4) {
472
- throw new RangeError('Replay frame RGBA data does not match its dimensions');
473
- }
474
- const sampleCount = Math.min(maximumSamples, pixelCount);
475
- const luminance = new Uint8Array(sampleCount);
476
- for (let index = 0; index < sampleCount; index += 1) {
477
- const pixel = Math.min(pixelCount - 1, Math.floor(index * pixelCount / sampleCount));
478
- const offset = pixel * 4;
479
- luminance[index] = Math.round((rgba[offset] * 54 + rgba[offset + 1] * 183 + rgba[offset + 2] * 19) / 256);
480
- }
481
- return { width, height, luminance };
482
- }
483
- export function replayFramesLookSimilar(previous, current) {
484
- if (!previous
485
- || previous.width !== current.width
486
- || previous.height !== current.height
487
- || previous.luminance.length !== current.luminance.length)
488
- return false;
489
- let totalDifference = 0;
490
- let changedSamples = 0;
491
- for (let index = 0; index < current.luminance.length; index += 1) {
492
- const difference = Math.abs(current.luminance[index] - previous.luminance[index]);
493
- totalDifference += difference;
494
- if (difference >= 12)
495
- changedSamples += 1;
496
- }
497
- const averageDifference = totalDifference / current.luminance.length;
498
- const changedRatio = changedSamples / current.luminance.length;
499
- return averageDifference <= 2.5 && changedRatio <= 0.01;
500
- }
501
- function privacyRegionsKey(regions) {
502
- return regions.map((region) => (`${region.mode}:${region.x}:${region.y}:${region.width}:${region.height}`)).join('|');
503
- }
504
- export function frameFingerprint(bytes) {
505
- let hash = 2166136261;
506
- const stride = Math.max(1, Math.floor(bytes.length / 8192));
507
- for (let index = 0; index < bytes.length; index += stride) {
508
- hash ^= bytes[index] || 0;
509
- hash = Math.imul(hash, 16777619);
510
- }
511
- return `${bytes.length.toString(16)}-${(hash >>> 0).toString(16)}`;
512
- }
513
- export function applyPrivacyRegions(rgba, width, height, regions) {
514
- regions.forEach((region) => {
515
- const startX = clamp(Math.floor(region.x), 0, width);
516
- const startY = clamp(Math.floor(region.y), 0, height);
517
- const endX = clamp(Math.ceil(region.x + region.width), 0, width);
518
- const endY = clamp(Math.ceil(region.y + region.height), 0, height);
519
- const color = region.mode === 'hide' ? 0 : 128;
520
- for (let y = startY; y < endY; y += 1) {
521
- for (let x = startX; x < endX; x += 1) {
522
- const offset = (y * width + x) * 4;
523
- rgba[offset] = color;
524
- rgba[offset + 1] = color;
525
- rgba[offset + 2] = color;
526
- rgba[offset + 3] = 255;
527
- }
528
- }
529
- });
530
- }
531
- function clamp(value, minimum, maximum) {
532
- return Math.min(maximum, Math.max(minimum, value));
533
- }
534
- //# sourceMappingURL=replay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replay.js","sourceRoot":"","sources":["../../../../../src/core/replay.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAE3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAUrF,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,YAAY,GAEb,MAAM,iBAAiB,CAAC;AAsBzB,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAoBvC,4CAA4C;AAC5C,MAAM,OAAO,eAAe;IAuB1B,YACmB,SAA4B,EAC5B,OAAwB,EACxB,aAAqC;QAFrC,cAAS,GAAT,SAAS,CAAmB;QAC5B,YAAO,GAAP,OAAO,CAAiB;QACxB,kBAAa,GAAb,aAAa,CAAwB;QAxBhD,SAAI,GAAG,KAAK,CAAC;QACb,YAAO,GAAG,KAAK,CAAC;QAChB,SAAI,GAAqC,MAAM,CAAC;QAChD,wBAAmB,GAAG,KAAK,CAAC;QAC5B,sBAAiB,GAAG,CAAC,CAAC;QACtB,WAAM,GAAwD,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;QAChF,gBAAW,GAAgC,iBAAiB,CAAC,EAAE,CAAC,CAAC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CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QACnE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/C,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtC,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;gBACnC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;gBACrB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;gBACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;gBACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,OAAe,EAAE,OAAe;IAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACrD,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { FTCanvasCapture } from '../core/replay.js';
2
- import type { FTCapturedFrame, FTReplayPrivacyMode, FTStoredFrame } from '../core/types.js';
3
- export declare class FTCreator3CanvasCapture implements FTCanvasCapture {
4
- private camera;
5
- private privacy;
6
- setCamera(camera: unknown): void;
7
- setPrivacy(node: unknown, mode: FTReplayPrivacyMode): void;
8
- getViewportSize(): {
9
- width: number;
10
- height: number;
11
- } | undefined;
12
- capture(maxImageDimension: number): Promise<FTCapturedFrame | undefined>;
13
- persist(frame: FTCapturedFrame, fingerprint?: string): Promise<FTStoredFrame>;
14
- disposeStoredFrame(frame: FTStoredFrame): Promise<void>;
15
- private collectPrivacyRegions;
16
- }
17
- //# sourceMappingURL=capture.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../../../src/creator3/capture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAmB,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAO7G,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,OAAO,CAA2C;IAE1D,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAIhC,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAK1D,eAAe,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAK1D,OAAO,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAqCxE,OAAO,CAAC,KAAK,EAAE,eAAe,EAAE,WAAW,SAA+B,GAAG,OAAO,CAAC,aAAa,CAAC;IAIzG,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,OAAO,CAAC,qBAAqB;CA6B9B"}