fix(tracker): some fixes for call event

This commit is contained in:
nick-delirium 2023-10-02 15:58:29 +02:00
parent 2d73439523
commit 2eb3a39491
2 changed files with 11 additions and 2 deletions

View file

@ -489,8 +489,9 @@ export default class Assist {
}
// UI
console.log(callUI)
if (!callUI) {
callUI = new CallWindow(app.debug.error, this.options.callUITemplate)
callUI = new CallWindow(console.log, this.options.callUITemplate)
callUI.setVideoToggleCallback(updateVideoFeed)
}
callUI.showControls(initiateCallEnd)
@ -539,6 +540,7 @@ export default class Assist {
sessionStorage.setItem(this.options.session_calling_peer_key, JSON.stringify(callingPeerIds))
this.emit('UPDATE_SESSION', { agentIds: callingPeerIds, isCallActive: true, })
}).catch(reason => { // in case of Confirm.remove() without user answer (not a error)
console.log(reason)
app.debug.log(reason)
})
})

View file

@ -54,7 +54,9 @@ export default class CallWindow {
.then((text) => {
iframe.onload = () => {
const assistSection = doc.getElementById('or-assist')
assistSection?.classList.remove('status-connecting')
setTimeout(() => {
assistSection?.classList.remove('status-connecting')
}, 0)
//iframe.style.height = doc.body.scrollHeight + 'px';
//iframe.style.width = doc.body.scrollWidth + 'px';
this.adjustIframeSize()
@ -110,6 +112,11 @@ export default class CallWindow {
// TODO: save coordinates on the new page
attachDND(iframe, dragArea, doc.documentElement)
}
setTimeout(() => {
const assistSection = doc.getElementById('or-assist')
assistSection?.classList.remove('status-connecting')
this.adjustIframeSize()
}, 250)
})
//this.toggleVideoUI(false)