change(tracker): move end call cb
This commit is contained in:
parent
256ec2093f
commit
8548e1d49e
2 changed files with 5 additions and 13 deletions
|
|
@ -377,8 +377,7 @@ export default class Assist {
|
|||
if (!callUI) {
|
||||
callUI = new CallWindow(app.debug.error)
|
||||
}
|
||||
callUI.setCallEndAction(initiateCallEnd)
|
||||
callUI.showControls()
|
||||
callUI.showControls(initiateCallEnd)
|
||||
|
||||
if (!annot) {
|
||||
annot = new AnnotationCanvas()
|
||||
|
|
|
|||
|
|
@ -122,16 +122,6 @@ export default class CallWindow {
|
|||
this.iframe.style.width = `${doc.body.scrollWidth}px`
|
||||
}
|
||||
|
||||
setCallEndAction(endCall: () => void) {
|
||||
this.load
|
||||
.then(() => {
|
||||
if (this.endCallBtn) {
|
||||
this.endCallBtn.onclick = endCall
|
||||
}
|
||||
})
|
||||
.catch((e) => this.logError(e))
|
||||
}
|
||||
|
||||
private checkRemoteVideoInterval: ReturnType<typeof setInterval>
|
||||
private audioContainer: HTMLDivElement | null = null
|
||||
addRemoteStream(rStream: MediaStream) {
|
||||
|
|
@ -280,12 +270,15 @@ export default class CallWindow {
|
|||
.catch((e) => this.logError(e))
|
||||
}
|
||||
|
||||
public showControls() {
|
||||
public showControls(endCall: () => void) {
|
||||
this.load
|
||||
.then(() => {
|
||||
if (this.controlsContainer) {
|
||||
this.controlsContainer.style.display = 'unset'
|
||||
}
|
||||
if (this.endCallBtn) {
|
||||
this.endCallBtn.onclick = endCall
|
||||
}
|
||||
this.adjustIframeSize()
|
||||
})
|
||||
.catch((e) => this.logError(e))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue