better iframe restarting via assist

This commit is contained in:
nick-delirium 2024-10-28 16:25:38 +01:00
parent 3aae1aafc1
commit 5d06c98e35
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
7 changed files with 25 additions and 12 deletions

View file

@ -1,3 +1,7 @@
## 10.0.1
- some fixes for waitstatus usage
## 10.0.0
- memory handling improvements to prevent possible leaks on sessions with multiple canvas nodes

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker-assist",
"description": "Tracker plugin for screen assistance through the WebRTC",
"version": "10.0.0",
"version": "10.0.1",
"keywords": [
"WebRTC",
"assistance",

View file

@ -380,14 +380,17 @@ export default class Assist {
if (this.app.active()) {
this.assistDemandedRestart = true
this.app.stop()
setTimeout(() => {
this.app.start().then(() => { this.assistDemandedRestart = false })
.then(() => {
this.remoteControl?.reconnect(ids)
})
.catch(e => app.debug.error(e))
// TODO: check if it's needed; basically allowing some time for the app to finish everything before starting again
}, 400)
this.app.waitStatus(0)
.then(() => {
this.app.allowAppStart()
setTimeout(() => {
this.app.start().then(() => { this.assistDemandedRestart = false })
.then(() => {
this.remoteControl?.reconnect(ids)
})
.catch(e => app.debug.error(e))
}, 100)
})
}
})

View file

@ -1,3 +1,7 @@
## 14.0.14
- fixed crossdomain restart logic (when triggered via assist)
## 14.0.13
- fixes for restart logic

View file

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

View file

@ -593,6 +593,10 @@ export default class App {
return
}
const nextCommand = this.pollingQueue.order[0]
if (nextCommand && this.pollingQueue[nextCommand].length === 0) {
this.pollingQueue.order = this.pollingQueue.order.filter((c) => c !== nextCommand)
return
}
if (this.pollingQueue[nextCommand].includes(data.context)) {
this.pollingQueue[nextCommand] = this.pollingQueue[nextCommand].filter(
(c: string) => c !== data.context,
@ -1762,12 +1766,10 @@ export default class App {
this.stopCallbacks.forEach((cb) => cb())
this.tagWatcher.clear()
if (this.worker && stopWorker) {
console.log('stop worker')
this.worker.postMessage('stop')
}
this.canvasRecorder?.clear()
this.messages.length = 0
this.trackedFrames = []
this.parentActive = false
this.canStart = false
} finally {