diff --git a/tracker/tracker-assist/src/CallWindow.ts b/tracker/tracker-assist/src/CallWindow.ts index 32ceaff38..fa99cd7fe 100644 --- a/tracker/tracker-assist/src/CallWindow.ts +++ b/tracker/tracker-assist/src/CallWindow.ts @@ -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 @@ -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')