@amplitude/rrweb-player 2.0.0-alpha.35 → 2.0.0-alpha.36

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 CHANGED
@@ -138,177 +138,3 @@ playRange(
138
138
  afterHook: undefined | (() => void) = undefined,
139
139
  )
140
140
  ```
141
-
142
- ## Sponsors
143
-
144
- [Become a sponsor](https://opencollective.com/rrweb#sponsor) and get your logo on our README on Github with a link to your site.
145
-
146
- ### Gold Sponsors 🥇
147
-
148
- <div dir="auto">
149
-
150
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/0/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
151
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/1/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
152
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/2/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
153
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/3/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
154
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/4/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
155
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/5/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
156
- <a href="https://opencollective.com/rrweb/tiers/gold-sponsor/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/gold-sponsor/6/avatar.svg?requireActive=false&avatarHeight=225" alt="sponsor"></a>
157
-
158
- </div>
159
-
160
- ### Silver Sponsors 🥈
161
-
162
- <div dir="auto">
163
-
164
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/0/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
165
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/1/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
166
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/2/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
167
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/3/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
168
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/4/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
169
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/5/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
170
- <a href="https://opencollective.com/rrweb/tiers/silver-sponsor/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/silver-sponsor/6/avatar.svg?requireActive=false&avatarHeight=158" alt="sponsor"></a>
171
-
172
- </div>
173
-
174
- ### Bronze Sponsors 🥉
175
-
176
- <div dir="auto">
177
-
178
- <a href="https://opencollective.com/rrweb/tiers/sponsors/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/0/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
179
- <a href="https://opencollective.com/rrweb/tiers/sponsors/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/1/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
180
- <a href="https://opencollective.com/rrweb/tiers/sponsors/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/2/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
181
- <a href="https://opencollective.com/rrweb/tiers/sponsors/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/3/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
182
- <a href="https://opencollective.com/rrweb/tiers/sponsors/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/4/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
183
- <a href="https://opencollective.com/rrweb/tiers/sponsors/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/5/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
184
- <a href="https://opencollective.com/rrweb/tiers/sponsors/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/6/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
185
- <a href="https://opencollective.com/rrweb/tiers/sponsors/7/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/7/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
186
- <a href="https://opencollective.com/rrweb/tiers/sponsors/8/website?requireActive=false" target="_blank"><img src="https://opencollective.com/rrweb/tiers/sponsors/8/avatar.svg?requireActive=false&avatarHeight=70" alt="sponsor"></a>
187
-
188
- </div>
189
-
190
- ### Backers
191
-
192
- <a href="https://opencollective.com/rrweb#sponsor" rel="nofollow"><img src="https://opencollective.com/rrweb/tiers/backers.svg?avatarHeight=36"></a>
193
-
194
- ## Core Team Members
195
-
196
- <table>
197
- <tr>
198
- <td align="center">
199
- <a href="https://github.com/Yuyz0112">
200
- <img
201
- src="https://avatars.githubusercontent.com/u/13651389?s=100"
202
- width="100px;"
203
- alt=""
204
- />
205
- <br /><sub><b>Yuyz0112</b></sub>
206
- <br /><br />
207
- </a>
208
- </td>
209
- <td align="center">
210
- <a href="https://github.com/YunFeng0817">
211
- <img
212
- src="https://avatars.githubusercontent.com/u/27533910?s=100"
213
- width="100px;"
214
- alt=""
215
- />
216
- <br /><sub><b>Yun Feng</b></sub>
217
- <br /><br />
218
- </a>
219
- </td>
220
- <td align="center">
221
- <a href="https://github.com/eoghanmurray">
222
- <img
223
- src="https://avatars.githubusercontent.com/u/156780?s=100"
224
- width="100px;"
225
- alt=""
226
- />
227
- <br /><sub><b>eoghanmurray</b></sub>
228
- <br /><br />
229
- </a>
230
- </td>
231
- <td align="center">
232
- <a href="https://github.com/Juice10">
233
- <img
234
- src="https://avatars.githubusercontent.com/u/4106?s=100"
235
- width="100px;"
236
- alt=""
237
- />
238
- <br /><sub><b>Juice10</b></sub>
239
- <br /><sub>open for rrweb consulting</sub>
240
- </a>
241
- </td>
242
- </tr>
243
- </table>
244
-
245
- ## Who's using rrweb?
246
-
247
- <table>
248
- <tr>
249
- <td align="center">
250
- <a href="http://www.smartx.com/" target="_blank">
251
- <img width="195px" src="https://www.rrweb.io/logos/smartx.png">
252
- </a>
253
- </td>
254
- <td align="center">
255
- <a href="https://posthog.com?utm_source=rrweb&utm_medium=sponsorship&utm_campaign=open-source-sponsorship" target="_blank">
256
- <img width="195px" src="https://www.rrweb.io/logos/posthog.png">
257
- </a>
258
- </td>
259
- <td align="center">
260
- <a href="https://statcounter.com/session-replay/" target="_blank">
261
- <img width="195px" src="https://statcounter.com/images/logo-statcounter-arc-blue.svg">
262
- </a>
263
- </td>
264
- <td align="center">
265
- <a href="https://recordonce.com/" target="_blank">
266
- <img width="195px" alt="Smart screen recording for SaaS" src="https://uploads-ssl.webflow.com/5f3d133183156245630d4446/5f3d1940abe8db8612c23521_Record-Once-logo-554x80px.svg">
267
- </a>
268
- </td>
269
- </tr>
270
- <tr>
271
- <td align="center">
272
- <a href="https://cux.io" target="_blank">
273
- <img style="padding: 8px" alt="The first ever UX automation tool" width="195px" src="https://cux.io/cux-logo.svg">
274
- </a>
275
- </td>
276
- <td align="center">
277
- <a href="https://remsupp.com" target="_blank">
278
- <img style="padding: 8px" alt="Remote Access & Co-Browsing" width="195px" src="https://remsupp.com/images/logo.png">
279
- </a>
280
- </td>
281
- <td align="center">
282
- <a href="https://highlight.io" target="_blank">
283
- <img style="padding: 8px" alt="The open source, fullstack Monitoring Platform." width="195px" src="https://github.com/highlight/highlight/raw/main/highlight.io/public/images/logo.png">
284
- </a>
285
- </td>
286
- <td align="center">
287
- <a href="https://analyzee.io" target="_blank">
288
- <img style="padding: 8px" alt="Comprehensive data analytics platform that empowers businesses to gain valuable insights and make data-driven decisions." width="195px" src="https://cdn.analyzee.io/assets/analyzee-logo.png">
289
- </a>
290
- </td>
291
- </tr>
292
- <tr>
293
- <td align="center">
294
- <a href="https://requestly.io" target="_blank">
295
- <img style="padding: 8px" alt="Intercept, Modify, Record & Replay HTTP Requests." width="195px" src="https://github.com/requestly/requestly/assets/16779465/652552db-c867-44cb-9bb5-94a2026e04ca">
296
- </a>
297
- </td>
298
- <td align="center">
299
- <a href="https://gleap.io" target="_blank">
300
- <img style="padding: 8px" alt="In-app bug reporting & customer feedback platform." width="195px" src="https://assets-global.website-files.com/6506f3f29c68b1724807619d/6506f56010237164c6306591_GleapLogo.svg">
301
- </a>
302
- </td>
303
- <td align="center">
304
- <a href="https://uxwizz.com" target="_blank">
305
- <img style="padding: 8px" alt="Self-hosted website analytics with heatmaps and session recordings." width="195px" src="https://github.com/UXWizz/public-files/raw/main/assets/logo.png">
306
- </a>
307
- </td>
308
- <td align="center">
309
- <a href="https://www.howdygo.com" target="_blank">
310
- <img style="padding: 8px" alt="Interactive product demos for small marketing teams" width="195px" src="https://assets-global.website-files.com/650afb446f1dd5bd410f00cc/650b2cec6188ff54dd9b01e1_Logo.svg">
311
- </a>
312
- </td>
313
- </tr>
314
- </table>
@@ -14597,6 +14597,15 @@ function v(t2) {
14597
14597
  } };
14598
14598
  return c2;
14599
14599
  }
14600
+ function isDuplicateEvent(existing, incoming) {
14601
+ if (existing === incoming) {
14602
+ return true;
14603
+ }
14604
+ if (existing.timestamp === incoming.timestamp && existing.type === incoming.type) {
14605
+ return JSON.stringify(existing) === JSON.stringify(incoming);
14606
+ }
14607
+ return false;
14608
+ }
14600
14609
  function discardPriorSnapshots(events, baselineTime) {
14601
14610
  for (let idx = events.length - 1; idx >= 0; idx--) {
14602
14611
  const event2 = events[idx];
@@ -14751,6 +14760,9 @@ function createPlayerService(context, { getCastFn, applyEventsSynchronously, emi
14751
14760
  addDelay(event2, baselineTime);
14752
14761
  let end = events.length - 1;
14753
14762
  if (!events[end] || events[end].timestamp <= event2.timestamp) {
14763
+ if (events[end] && isDuplicateEvent(events[end], event2)) {
14764
+ return { ...ctx, events };
14765
+ }
14754
14766
  events.push(event2);
14755
14767
  } else {
14756
14768
  let insertionIndex = -1;
@@ -14766,6 +14778,16 @@ function createPlayerService(context, { getCastFn, applyEventsSynchronously, emi
14766
14778
  if (insertionIndex === -1) {
14767
14779
  insertionIndex = start;
14768
14780
  }
14781
+ for (let i2 = insertionIndex - 1; i2 >= 0 && events[i2].timestamp === event2.timestamp; i2--) {
14782
+ if (isDuplicateEvent(events[i2], event2)) {
14783
+ return { ...ctx, events };
14784
+ }
14785
+ }
14786
+ for (let i2 = insertionIndex; i2 < events.length && events[i2].timestamp === event2.timestamp; i2++) {
14787
+ if (isDuplicateEvent(events[i2], event2)) {
14788
+ return { ...ctx, events };
14789
+ }
14790
+ }
14769
14791
  events.splice(insertionIndex, 0, event2);
14770
14792
  }
14771
14793
  const isSync = event2.timestamp < baselineTime;