tracker add more canvas checks, release 14.0.6

This commit is contained in:
nick-delirium 2024-09-06 11:57:25 +02:00
parent e7fe260c81
commit dbd065aec7
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# 14.0.6
- support feature off toggle for feature flags and usability testing
- additional checks for canvas snapshots
# 14.0.5

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker",
"description": "The OpenReplay tracker main package",
"version": "14.0.5",
"version": "14.0.6",
"keywords": [
"logging",
"replay"

View file

@ -104,6 +104,13 @@ class CanvasRecorder {
this.fileExt,
(blob) => {
if (!blob) return
if (!this.snapshots[id]) {
return this.app.debug.warn(
'Canvas not present in snapshots after capture:',
this.snapshots,
id,
)
}
this.snapshots[id].images.push({ id: this.app.timestamp(), data: blob })
if (this.snapshots[id].images.length > 9) {
this.sendSnaps(this.snapshots[id].images, id, this.snapshots[id].createdAt)