fix(tracker): fix iframe observer timeout; 9.0.8

This commit is contained in:
nick-delirium 2023-09-11 14:26:23 +02:00
parent 9223c2adc9
commit b54555b4a0
3 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,7 @@
# 9.0.8
- added slight delay to iframe handler (rapid updates of stacked frames used to break player)
# 9.0.7
- fix for `getSessionURL` method

View file

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

View file

@ -97,7 +97,8 @@ export default class TopObserver extends Observer {
//@ts-ignore https://github.com/microsoft/TypeScript/issues/41684
this.contextCallbacks.forEach((cb) => cb(currentWin))
}
}, 0),
// we need this delay because few iframes stacked one in another with rapid updates will break the player (or browser engine rather?)
}, 100),
)
iframe.addEventListener('load', handle) // why app.attachEventListener not working?
handle()