@openreplay/tracker 9.0.7 → 9.0.8-beta.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 9.0.8
2
+
3
+ - added slight delay to iframe handler (rapid updates of stacked frames used to break player)
4
+
1
5
  # 9.0.7
2
6
 
3
7
  - fix for `getSessionURL` method
package/cjs/app/index.js CHANGED
@@ -42,7 +42,7 @@ class App {
42
42
  this.stopCallbacks = [];
43
43
  this.commitCallbacks = [];
44
44
  this.activityState = ActivityState.NotActive;
45
- this.version = '9.0.7'; // TODO: version compatability check inside each plugin.
45
+ this.version = '9.0.8-beta.1'; // TODO: version compatability check inside each plugin.
46
46
  this.compressionThreshold = 24 * 1000;
47
47
  this.restartAttempts = 0;
48
48
  this.bc = null;
@@ -72,7 +72,8 @@ class TopObserver extends observer_js_1.default {
72
72
  //@ts-ignore https://github.com/microsoft/TypeScript/issues/41684
73
73
  this.contextCallbacks.forEach((cb) => cb(currentWin));
74
74
  }
75
- }, 0));
75
+ // we need this delay because few iframes stacked one in another with rapid updates will break the player (or browser engine rather?)
76
+ }, 100));
76
77
  iframe.addEventListener('load', handle); // why app.attachEventListener not working?
77
78
  handle();
78
79
  }
package/cjs/index.js CHANGED
@@ -153,7 +153,7 @@ class API {
153
153
  // no-cors issue only with text/plain or not-set Content-Type
154
154
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
155
155
  req.send(JSON.stringify({
156
- trackerVersion: '9.0.7',
156
+ trackerVersion: '9.0.8-beta.1',
157
157
  projectKey: options.projectKey,
158
158
  doNotTrack,
159
159
  // TODO: add precise reason (an exact API missing)
@@ -89,7 +89,8 @@ function default_1(app, opts) {
89
89
  function getInputValue(id, node) {
90
90
  let value = node.value;
91
91
  let inputMode = options.defaultInputMode;
92
- if (node.type === 'password' || app.sanitizer.isHidden(id)) {
92
+ console.log(inputMode, node.type, node.value);
93
+ if (node.type === 'password' || app.sanitizer.isHidden(id), app.sanitizer.isObscured(id)) {
93
94
  inputMode = exports.InputMode.Hidden;
94
95
  }
95
96
  else if (app.sanitizer.isObscured(id) ||
@@ -154,6 +155,7 @@ function default_1(app, opts) {
154
155
  function sendInputChange(id, node, hesitationTime, inputTime) {
155
156
  const { value, mask } = getInputValue(id, node);
156
157
  const label = getInputLabel(node);
158
+ console.log('sent input change', id, label, value);
157
159
  app.send((0, messages_gen_js_1.InputChange)(id, value, mask !== 0, label, hesitationTime, inputTime));
158
160
  }
159
161
  app.nodes.attachNodeCallback(app.safe((node) => {
@@ -167,6 +169,7 @@ function default_1(app, opts) {
167
169
  app.nodes.attachNodeListener(node, 'change', () => sendInputValue(id, node));
168
170
  }
169
171
  if (isTextFieldElement(node)) {
172
+ console.log('found text input', node);
170
173
  trackInputValue(id, node);
171
174
  let nodeFocusTime = 0;
172
175
  let nodeHesitationTime = 0;
@@ -176,6 +179,7 @@ function default_1(app, opts) {
176
179
  };
177
180
  const onInput = () => {
178
181
  if (nodeHesitationTime === 0 && nodeFocusTime !== 0) {
182
+ console.log('started typing in input after: ', nodeFocusTime);
179
183
  nodeHesitationTime = (0, utils_js_1.now)() - nodeFocusTime;
180
184
  }
181
185
  };
package/lib/app/index.js CHANGED
@@ -39,7 +39,7 @@ export default class App {
39
39
  this.stopCallbacks = [];
40
40
  this.commitCallbacks = [];
41
41
  this.activityState = ActivityState.NotActive;
42
- this.version = '9.0.7'; // TODO: version compatability check inside each plugin.
42
+ this.version = '9.0.8-beta.1'; // TODO: version compatability check inside each plugin.
43
43
  this.compressionThreshold = 24 * 1000;
44
44
  this.restartAttempts = 0;
45
45
  this.bc = null;
@@ -70,7 +70,8 @@ export default class TopObserver extends Observer {
70
70
  //@ts-ignore https://github.com/microsoft/TypeScript/issues/41684
71
71
  this.contextCallbacks.forEach((cb) => cb(currentWin));
72
72
  }
73
- }, 0));
73
+ // we need this delay because few iframes stacked one in another with rapid updates will break the player (or browser engine rather?)
74
+ }, 100));
74
75
  iframe.addEventListener('load', handle); // why app.attachEventListener not working?
75
76
  handle();
76
77
  }
package/lib/index.js CHANGED
@@ -148,7 +148,7 @@ export default class API {
148
148
  // no-cors issue only with text/plain or not-set Content-Type
149
149
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
150
150
  req.send(JSON.stringify({
151
- trackerVersion: '9.0.7',
151
+ trackerVersion: '9.0.8-beta.1',
152
152
  projectKey: options.projectKey,
153
153
  doNotTrack,
154
154
  // TODO: add precise reason (an exact API missing)
@@ -85,7 +85,8 @@ export default function (app, opts) {
85
85
  function getInputValue(id, node) {
86
86
  let value = node.value;
87
87
  let inputMode = options.defaultInputMode;
88
- if (node.type === 'password' || app.sanitizer.isHidden(id)) {
88
+ console.log(inputMode, node.type, node.value);
89
+ if (node.type === 'password' || app.sanitizer.isHidden(id), app.sanitizer.isObscured(id)) {
89
90
  inputMode = InputMode.Hidden;
90
91
  }
91
92
  else if (app.sanitizer.isObscured(id) ||
@@ -150,6 +151,7 @@ export default function (app, opts) {
150
151
  function sendInputChange(id, node, hesitationTime, inputTime) {
151
152
  const { value, mask } = getInputValue(id, node);
152
153
  const label = getInputLabel(node);
154
+ console.log('sent input change', id, label, value);
153
155
  app.send(InputChange(id, value, mask !== 0, label, hesitationTime, inputTime));
154
156
  }
155
157
  app.nodes.attachNodeCallback(app.safe((node) => {
@@ -163,6 +165,7 @@ export default function (app, opts) {
163
165
  app.nodes.attachNodeListener(node, 'change', () => sendInputValue(id, node));
164
166
  }
165
167
  if (isTextFieldElement(node)) {
168
+ console.log('found text input', node);
166
169
  trackInputValue(id, node);
167
170
  let nodeFocusTime = 0;
168
171
  let nodeHesitationTime = 0;
@@ -172,6 +175,7 @@ export default function (app, opts) {
172
175
  };
173
176
  const onInput = () => {
174
177
  if (nodeHesitationTime === 0 && nodeFocusTime !== 0) {
178
+ console.log('started typing in input after: ', nodeFocusTime);
175
179
  nodeHesitationTime = now() - nodeFocusTime;
176
180
  }
177
181
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "9.0.7",
4
+ "version": "9.0.8-beta.1",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"