Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
adjustComponent(initial) {
if (isMobile()) {
let isFullScreen = screenfull && screenfull.isFullscreen;
if (!isFullScreen) {
if (parseInt(getComputedStyle(this.parentNode).height) < window.innerHeight) {
this.style.height = getComputedStyle(this.parentNode).height;
} else this.style.height = `${window.innerHeight}px`;
} else {
screenfull.onChangeHandler({ target: this }); //dispatch event
}
if (initial) {
this.shadowRoot.getElementById('flipBtn').style.setProperty('display', 'none', 'important');
let remoteCamera = this.shadowRoot.getElementById('cameraRemoteBtn');
if (remoteCamera) {
let localCameraBtnIcon = this.shadowRoot.querySelector('#cameraLocalBtn .circle');
if (localCameraBtnIcon) {
localCameraBtnIcon.innerHTML = this.shadowRoot.querySelector('#cameraRemoteBtn .circle').innerHTML;
} else this.removeChooseLabel();
remoteCamera.parentNode.removeChild(remoteCamera);
}
Array.prototype.forEach.call(this.shadowRoot.querySelectorAll('.cameraLocalLabel, .browseLabel'), elem => toggleClass(elem, 'hidden'));
Array.prototype.forEach.call(this.shadowRoot.querySelectorAll('#flipBtn, .video video'), elem => toggleClass(elem, 'flipped'));
}
}
this.adjustCardPlacer(isMobile());