fix(tracker): fix videofeed windows
This commit is contained in:
parent
9e25f8ef69
commit
556c486698
1 changed files with 29 additions and 0 deletions
|
|
@ -16,6 +16,8 @@ export default class CallWindow {
|
|||
private remoteControlContainer: HTMLElement | null = null
|
||||
private remoteControlEndBtn: HTMLElement | null = null
|
||||
private controlsContainer: HTMLElement | null = null
|
||||
private remoteVideoOn = false
|
||||
private localVideoOn = false
|
||||
|
||||
private tsInterval: ReturnType<typeof setInterval>
|
||||
|
||||
|
|
@ -171,10 +173,23 @@ export default class CallWindow {
|
|||
this.load
|
||||
.then(() => {
|
||||
if (this.videoContainer) {
|
||||
this.remoteVideoOn = enable
|
||||
if (enable) {
|
||||
this.videoContainer.classList.add('remote')
|
||||
if (this.localVideoOn) {
|
||||
this.vLocal && Object.assign(this.vLocal.style, {
|
||||
width: '35%',
|
||||
height: 'unset',
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.videoContainer.classList.remove('remote')
|
||||
if (this.localVideoOn) {
|
||||
this.vLocal && Object.assign(this.vLocal.style, {
|
||||
width: 'unset',
|
||||
height: '100%',
|
||||
})
|
||||
}
|
||||
}
|
||||
this.adjustIframeSize()
|
||||
}
|
||||
|
|
@ -228,9 +243,23 @@ export default class CallWindow {
|
|||
if (!this.videoBtn || !this.videoContainer) {
|
||||
return
|
||||
}
|
||||
this.localVideoOn = enabled
|
||||
if (enabled) {
|
||||
this.videoContainer.classList.add('local')
|
||||
this.videoBtn.classList.remove('off')
|
||||
if (this.remoteVideoOn) {
|
||||
this.vLocal && Object.assign(this.vLocal.style, {
|
||||
width: '35%',
|
||||
height: 'unset',
|
||||
})
|
||||
} else {
|
||||
if (this.remoteVideoOn) {
|
||||
this.vLocal && Object.assign(this.vLocal.style, {
|
||||
width: 'unset',
|
||||
height: '100%',
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.videoContainer.classList.remove('local')
|
||||
this.videoBtn.classList.add('off')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue