diff --git a/css/styles.css b/css/styles.css index 3693da9..aa819a9 100644 --- a/css/styles.css +++ b/css/styles.css @@ -23,7 +23,6 @@ table, th, td { margin: 0 auto; height: 600px; - width: 800px; & > canvas, & > video { position: absolute; diff --git a/js/camera.js b/js/camera.js index 0bca072..f281477 100644 --- a/js/camera.js +++ b/js/camera.js @@ -121,6 +121,9 @@ export class Camera { } this.videoElement.srcObject = await this.getVideoInputDevice(); + + this.jellronDisplay.style.aspectRatio = `${await this.getMediaStreamWidth() / await this.getMediaStreamHeight()}`; + this.videoElement.height = this.jellronDisplay.scrollHeight; this.videoElement.width = this.jellronDisplay.scrollWidth; }