fix(tracker): fix remote control reconnection
This commit is contained in:
parent
a5ec35b270
commit
3f1ade3b7d
1 changed files with 6 additions and 1 deletions
|
|
@ -92,7 +92,12 @@ export default class RemoteControl {
|
|||
this.mouse = new Mouse(agentName)
|
||||
this.mouse.mount()
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.hidden) this.releaseControl(false, false)
|
||||
if (document.hidden) this.releaseControl(false, true)
|
||||
else {
|
||||
if (this.status === RCStatus.Disabled) {
|
||||
this.reconnect([id,])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue