diff --git a/slaeforms/static/videoscript.js b/slaeforms/static/videoscript.js index 9cb8681..4497511 100644 --- a/slaeforms/static/videoscript.js +++ b/slaeforms/static/videoscript.js @@ -7,7 +7,6 @@ const buttonDeleteIcon = document.getElementById('buttonDeleteIcon'); const videoDisplay = document.getElementById('videoDisplay'); const videoContainer = document.getElementById('videoContainer'); // div that contains the videodisplay -const videoContainerCss = document.querySelector('.video-container') //might be unnecessary var mediaRecorder = null; // interface of the Media Stream Recording API to record the video stream var stream = null; // webcam video input stream @@ -16,7 +15,7 @@ let isRecording = false; // false to display record button, true to display s let videoAccess = false; // true if user has given permission to use the webcam // default video dimensions -let videoHeigt = 720; +let videoHeight = 720; let videoWidth = 1280; // handle form submission @@ -79,22 +78,22 @@ async function cameraButton() { videoAccess = true; // set the dimensions of the webcam stream to the video display - videoHeigt = stream.getVideoTracks()[0].getSettings().height + videoHeight = stream.getVideoTracks()[0].getSettings().height videoWidth = stream.getVideoTracks()[0].getSettings().width // calculate the aspec ratio - let aspectratio = (videoHeigt / videoWidth) *100 - //console.log("videoHeigt: ",videoHeigt); + let aspectratio = (videoHeight / videoWidth) *100; + //console.log("videoHeight: ",videoHeight); //console.log("videoWidth: ",videoWidth); //console.log("aspect ratio: ",aspectratio); //console.log("device: ",stream.getVideoTracks()[0].getSettings().deviceId); // adjust CSS to make the video fit properly // this makes sure that there is no buggy "jumping" when the video display source changes - videoContainer.style.setProperty("padding-bottom", "min("+videoHeigt+"px,"+aspectratio+"%)"); + videoContainer.style.setProperty("padding-bottom", "min("+videoHeight+"px,"+aspectratio+"%)"); // adjust the max width for horizontal and vertical video input - if (videoHeigt > videoWidth){ //hochkant video + if (videoHeight > videoWidth){ //hochkant video videoContainer.style.setProperty("max-width", "min(80%,576"); }else{ //normal, horizontal videoContainer.style.setProperty("max-width", "100%"); diff --git a/slaeforms/templates/standard_template.html b/slaeforms/templates/standard_template.html index 967a75a..db061b8 100644 --- a/slaeforms/templates/standard_template.html +++ b/slaeforms/templates/standard_template.html @@ -225,7 +225,6 @@ step={{question["step"]}} {% else %}

Error: Block {{config["question 1"]["blocks"][block]["type"]}} could not be loaded!